Bouncing Dots
Three dots bouncing in sequence.
<div class="flex items-center gap-2" role="status" aria-label="Loading"> <span class="w-3 h-3 rounded-full bg-indigo-600 animate-bounce" style="animation-delay: 0ms"></span> <span class="w-3 h-3 rounded-full bg-indigo-600 animate-bounce" style="animation-delay: 150ms"></span> <span class="w-3 h-3 rounded-full bg-indigo-600 animate-bounce" style="animation-delay: 300ms"></span> </div>
Free to use in personal and commercial projects. No attribution required.
Variants
Same component, different looks. Preview each one live and copy the code you like.
Large
Bigger dots for empty states and larger loading areas.
Emerald
Green dots for success themed contexts like payment processing.
Chat bubble
Dots inside a message bubble, the classic chat typing indicator.
About this bouncing dots
Three dots bouncing in sequence is the conversational loading indicator: chat apps, AI assistants, comment sections. The staggered animation-delay (0ms, 150ms, 300ms) creates the wave that says someone is typing.
This typing indicator uses Tailwind's animate-bounce with inline delays. It is pure CSS and loops forever. The indigo dots on transparent background work on any surface.
Use it where a spinner would feel too mechanical: messaging, AI responses, live collaboration. The dots feel human because they mimic the rhythm of typing.
A spinner says machine working, which is exactly wrong inside a conversation. When someone waits for a chat reply, they expect the rhythm of a person typing, not an industrial loading bar. Bouncing dots borrow the typing indicator from messaging apps, and the familiarity does measurable work: users will wait longer for dots than for a spinner, because dots promise that a human-like response is on its way.
Three spans, each w-3 h-3 rounded-full bg-indigo-600 animate-bounce, with inline animation-delay values of 0ms, 150ms, and 300ms. The stagger turns three identical bounces into a traveling wave; without it you would just have three dots jumping in unison. The flex items-center gap-2 wrapper keeps the spacing even while they move.
For an inline typing hint inside a message bubble, shrink to w-1.5 h-1.5 so the dots sit comfortably next to text. Slow the delays to 0/200/400ms for a lazier, calmer wave on professional tools. Match the dot color to the chat theme: emerald for a WhatsApp-like feel, sky for Messenger-like, keeping the transparent background so they work on any bubble color.
The mistake is making the dots too big. At w-5 or larger they stop reading as typing and become just another loading animation, which breaks the conversational illusion the pattern depends on. Typing dots are punctuation, not a marquee. Keep them small relative to the surrounding text (w-2 to w-3) so they whisper instead of shout.
Where to use it
- ✓ Chat typing indicators
- ✓ AI response loading
- ✓ Comment submission
- ✓ Live collaboration cursors
Customization tips
Adjust delays for faster/slower waves. Use smaller dots (w-2) for inline text. For a subtler effect, animate opacity instead of bounce.
Design notes
When to use
Use it where a spinner would feel too mechanical: chat typing indicators, AI response loading, and comment submissions. The staggered bounce mimics the rhythm of typing, so it feels human in conversational interfaces. It works on any background since the dots carry the meaning.
What to avoid
Do not use it for determinate processes like file uploads, where users expect a progress bar. Do not use it for system-level loading like page boots, where the classic spinner reads more clearly.
Accessibility
Give it role=status with an aria-label such as Typing or Loading, since bouncing dots announce nothing on their own. Provide a reduced-motion alternative that does not bounce.
Frequently asked questions
How do I make typing dots?
Three dots with animate-bounce and staggered animation-delay via inline styles (0ms, 150ms, 300ms). The delay creates the wave sequence.
Dots vs spinner for loading?
Dots feel conversational and human; spinners feel mechanical. Use dots for messaging and AI, spinners for data loading.
Should typing indicators be accessible?
Yes, wrap in role=status with an aria-label like 'Someone is typing'. Otherwise screen readers announce nothing.
How do I stagger the dots so they bounce in sequence?
Give each dot an animation-delay that steps by the same amount, like 0s, 0.15s, and 0.3s. The delay offsets each dot's bounce cycle so they ripple instead of moving together. In Tailwind you can use arbitrary values like [animation-delay:0.15s] on each dot.
How long should a typing indicator show before giving up?
There is no strict rule, but most chat apps show it while a response is genuinely being generated and swap it for an error or retry option after 30 to 60 seconds. A typing indicator that never resolves makes users think the app froze, so pair it with a timeout in your code.
Can I use typing dots for an AI chatbot loading state?
Yes, typing dots are the standard pattern for AI chat because they suggest a response is being composed. Pair them with a screen-reader announcement like 'AI is typing' via aria-live so assistive technology users get the same information. Swap the dots for the actual message when the stream arrives.