Spinner
Shows that something is loading. Takes the colour of the text it sits in, or a tone.
Syncing
Installation
Or with the shadcn CLI, from the registry:
Usage
Sizes and tones
Three sizes; without a tone it takes currentColor, so it matches the button, badge or text around it.
Villages
The spinner has no surface of its own: it follows the text colour, and the tones follow the nature and the status colours of each village.
Syncing
Syncing
Syncing
Syncing
Syncing
Syncing
Accessibility
role="status"with the name "Loading". Say what loads witharia-label("Loading invoices") when several things can load at once.- With reduced motion it turns slowly rather than stopping, so it still reads as busy.
API reference
The props of <svg> (Lucide's Loader2Icon), plus:
| Prop | Type | Default |
|---|---|---|
size | "sm" | "default" | "lg" | "default" |
tone | "neutral" | "primary" | "success" | "warning" | "info" | "destructive" | none: currentColor |
spinnerVariants({ size, tone }) returns the same classes.