Installation
Usage
import { Dots } from "@/components/loading-ui/dots";<Dots />Customization
Dots lays out aspect-square markers with grow inside a flex row, so width on the root (for example w-16) is the main lever for overall scale. Each dot blinks on a staggered delay; color comes from bg-current and inherited foreground. The Color preview uses explicit hex swatches.
Size
Widen or narrow the container—the dots distribute evenly with a percentage gap.
Color
The first row uses semantic utilities; the second uses arbitrary hex so swatches stay obvious in any theme.
Duration
Set --duration to make the blink feel snappier or calmer.
Dot count
Pass dots when you want a longer ellipsis or a denser beat (three is the default).
Examples
These examples lean into chat, drafts, and typing metaphors—pair with honest labels so users know it is progress, not decoration.
Button
Disabled buttons plus dots communicate a short blocking action without swapping in a different icon set.
Badge
Tight chips for “typing” or “AI drafting” stay scannable because the row height matches the badge line box.
Accordion
Use the accordion header as a live status surface while longer copy stays tucked in the panel.
Blinking dots sell the “still writing” beat without stealing focus from the accordion chrome.
Input group
A textarea footer mirrors classic messenger UX: dots plus a single line of system copy.
Empty
Gradient framing makes the empty state feel transitional—swap to a message list once the first typist appears.
No messages yet
When the first participant starts typing, swap this empty state for a slim row—the dots read instantly as “someone is composing.”