shadcn.io is an independent project built on shadcn/ui
A spinner and the words Loading data... sit on one line, with a small gap. The spinner is the default size. Nothing in the file loads data.
Use a word or two so people know what is loading, in a list or a panel. If you know the fraction, show Progress instead. In Vue, Ark UI announces Loading as well as the visible words.
Installation
Anatomy

Usage
<div class="flex items-center gap-2">
<Spinner />
<span class="text-sm">Loading data...</span>
</div>FAQ
How does the spinner sit on the same line as the text?
A div with flex items-center gap-2 holds the Spinner and a span. items-center lines them up, and gap-2 is the space between them.
What does the line say?
The span is text-sm and reads "Loading data...". The ellipsis is part of that string. The spinner is the default size, size-4.
How do I put the spinner after the words?
Swap the children: the span first, then the Spinner. The row still uses flex items-center gap-2. Add size-3 on the spinner when it should be smaller than the default.
How do I mute this line?
Add text-muted-foreground on the flex div. The span inherits it, and the spinner does too, because the icon uses currentColor.
API Reference
Spinner
No extra props in this demo. The rest is on the Spinner page.





