Spinner
An accessible SVG loading indicator with four styles that follow the page tempo and slow down under reduced motion.
Customize
Installation
npx shadcn@latest add @kinetic/spinnerUsage
Render Spinner where content is loading. It announces itself with role="status".
import { Spinner } from "@/components/kinetic/ui/spinner";
export function Loading() {
return <Spinner label="Loading results" />;
}Variants
Choose variant from ring, bars, dots or orbit.
<Spinner variant="bars" />
<Spinner variant="dots" />
<Spinner variant="orbit" />Size and color
The spinner draws with currentColor and is size-4 by default. Change both with utility classes.
<Spinner className="size-6 text-primary" />Inside a button
Add data-icon="inline-start" or data-icon="inline-end" and leave out size classes so the button sizes it. Set aria-hidden when the button text already says it is busy.
<Button disabled>
<Spinner data-icon="inline-start" aria-hidden="true" />
Saving
</Button>Motion preferences
speed multiplies the playback rate together with the page tempo. Reduced motion keeps the spinner moving, only slower, so it still signals progress.
API Reference
Spinner
Zero-dependency accessible SVG loading indicator powered by WAAPI animations that honor speed, tempo scaling, and prefers-reduced-motion slowdowns.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "ring" | "bars" | "dots" | "orbit" | "ring" | Selects breathing ring arc, 8 radial spokes, 3-dot wave, or counter-rotating orbits. |
speed | number | 1 | Playback speed multiplier combined with KineticProvider tempo. |
label / aria-label | string | "Loading" | Accessible status announcement omitted automatically when aria-hidden='true' is passed. |