shadcn.io is an independent project built on shadcn/ui
One spinner is on screen at 16px, in the primary color. It is not the default text color. The file does not start a request.
Use the primary color when the wait is the main thing on screen and should carry the brand. Quiet background work should stay muted. A measured wait fits Progress. In Svelte, Ark UI names it Loading.
Installation
Anatomy

Usage
<Spinner class="text-primary" />FAQ
How does this spinner use the primary color?
Pass text-primary on Spinner. The icon draws with currentColor, so the text class paints the stroke. This file sets that class and nothing else.
Does text-primary follow the theme?
Yes. text-primary reads the same token as primary text elsewhere, including in light and dark mode. Change the token and this spinner follows.
What size is the primary spinner?
It stays at the default size-4 (16px). Add size-3, size-6, or size-8 on the same element to resize it. The color class stays put.
How do I use this color inside a button?
Put the Spinner in the Button with data-icon set to inline-start, and disable the button while the work runs. A filled button already sets its own text color, so the spinner picks that up through currentColor. Add text-primary when the spinner sits outside a button, as this file does.
API Reference
Spinner
No extra props in this demo. The rest is on the Spinner page.





