shadcn.io is not affiliated with official shadcn/ui
Spinner examples · Standard
Muted Spinner for React
A spinner in the muted foreground color for quiet background work.
Background work shouldn't pull the eye from the content. This Spinner takes text-muted-foreground, the color of captions, so it reads as secondary: use it for syncing, saving drafts and other passive waits.
Preview
Installation
FAQ
How is this spinner muted?
Pass text-muted-foreground on Spinner. The icon draws with currentColor, so that text class is the color. This file changes nothing else.
What size is the muted spinner?
It stays at the default size-4 (16px). Add size-3 or size-8 on the same element when the wheel should be smaller or larger. Color and size are both classes.
Does the muted color follow light and dark mode?
Yes. text-muted-foreground reads the theme token, the same one captions and secondary labels use. You do not set a separate color for dark mode.
Can the parent set the muted color instead?
Yes. A text class on the parent tints the spinner, because the stroke is currentColor. This file puts text-muted-foreground on the Spinner itself, so the color stays even if the parent is a different color.
Related
- Default SpinnerA spinner at its default size and color
- Primary Color SpinnerA spinner in the primary color for a
- Spinner Before TextA small spinner before a muted line of
- Spinner After TextA small spinner after a line of text
- Large SpinnerA large 32px spinner for a page or a
- Small SpinnerA small 12px spinner for dense and inline