An animated indicator for loading states.
$ pnpm dlx shadcn@latest add https://dashral.com/r/spinner.jsonInstallation
$ pnpm dlx shadcn@latest add https://dashral.com/r/spinner.jsonAdds the component, the components it builds on, its npm packages and the theme tokens it uses. Using Dashral often? Add the registry to components.json once:
components.json
{
"registries": {
"@dashral": "https://dashral.com/r/{name}.json"
}
}Then add components by name:
$ pnpm dlx shadcn@latest add @dashral/spinnerUsage
example.tsx
import { Spinner } from "@/components/dashral/spinner"
<Spinner label="Loading orders" />Examples
API reference
Spinner
Also takes every prop of <svg>.
| Prop | Type | Default |
|---|---|---|
size | "sm" | "default" | "lg" | "xl" | "default" |
label | stringRead by screen readers. | "Loading" |
Accessibility
- role="status" with your label.
Motion
- Spins; slower with reduced motion, so it still shows something is happening.