Spinner
Says something is loading when there is no telling how long it takes.
Installation
npm i @uisatin/uiimport { Spinner } from '@uisatin/ui/spinner'About 11.8 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.
npx shadcn@latest add https://uisatin.dev/r/spinner.jsonAdds spinner.tsx and labels.tsx to components/ui.
First time with Satin? Set it up once, styles and fonts included, with the installation guide.
API Reference
The Spinner component is a span with role="status" around a turning arc in the current colour. With label={null} it is hidden from screen readers.
| Prop | Type | Default |
|---|---|---|
size | "xs""sm""md""lg" | "md" |
label | stringnull | "Loading" |
className | string | — |
ref | Ref<HTMLSpanElement> | — |
...props | ComponentProps<'span'>Other attributes go to <span> | — |
Accessibility
On its own it is role="status" named "Loading" (or label). With label={null} it is hidden from screen readers, for a spinner inside something that already says it is busy, such as a loading Button.
Something wrong or missing on this page?
Report a problemSuggest an improvement