Spinner: Inline
Next to text, mark the spinner aria-hidden so the words do the talking. On its own, it announces its label.
Saving changes…
Spinners use the text color around them.
This adds the example as components/examples/spinner/inline.tsx, together with the Spinner component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/spinner-inline.jsonTo add only the component, follow the Spinner installation.
Props in this example
The Spinner props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
variant | "ticks" | "ring" | "ticks" |
sizenull leaves sizing to the parent. | "sm" | "default" | "lg" | "xl" | null | "default" |
label | string | "Loading" |
Every prop is in the Spinner API reference.
See them all, with keyboard support and accessibility notes, on the Spinner page.
- useDelayedLoadingShows a loading state only when work is actually slow, then keeps it up long enough that it never flickers.
- AlertInline messages for status and feedback, with a neutral surface, a colored icon and a dismiss that collapses smoothly.
- EmptyA placeholder for screens with nothing to show yet, with an icon, a message and the next action.
- ProgressA bar or ring that shows how far a task has come, eases between updates and slides while the total is unknown.
- SkeletonPlaceholders that wait 150ms before showing, take the exact size of the content they wrap, and fade it in without moving anything.
- ToastBrief messages that stack neatly, expand on hover, swipe away, and turn a loading state into success or error in place.