Spinner
A pure-CSS indeterminate indicator that inherits currentColor and costs nothing to render.
Live preview
Source
The exact file rendered in the preview above.
components/demos/spinner.tsx
components/ui/spinner.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
For waits short enough that layout should not change. For anything longer, a Skeleton communicates more, because it shows what is arriving.
- Pass `label` only when the spinner is the sole indication of a wait; inside a Button the button already announces itself busy.
- Drawn with a border rather than an SVG, so it inherits colour and needs no fill props.
- Under `prefers-reduced-motion` the rotation stops — which is exactly why the accessible label matters.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Four sizes
- Labelled — standalone
- Unlabelled — inside a labelled control
Accessibility
- Status role
- A labelled spinner is a polite `role="status"`; an unlabelled one is fully decorative.
- Reduced motion
- The global reset disables the animation; the label continues to convey the state.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsButton
The complete action surface: nine variants, five sizes, and a loading state that preserves the control’s measured width.
starterFeatured7 variantsProgress
Determinate and indeterminate progress as a bar or a ring, with four tones.
starter5 variantsSkeleton
Placeholder geometry for resolving content, in line, block, circle and button shapes.
starter5 variants