Spinner
- Stable
- WCAG 2.2 evidence
- RTL
Small loading indicator. Presentational: renders in React Server Components.
Animation runs only when the user has not asked for reduced motion (WCAG 2.3.3); the static glyph still conveys
the state, and the accessible name (label) carries it for assistive technology (WCAG 4.1.3).
import { Spinner } from "@nexera-ui/react";- 2
- examples
- 4
- props
- 3
- live controls
- 1
- platform
- 5
- WCAG criteria
- 1
- block uses it
Try every prop. Copy the code.
Change the props and the code updates. Check light and dark, LTR and RTL, and phone width.
import { Spinner } from "@nexera-ui/react";
<Spinner />Examples 1
The same examples as Storybook, rendered live. Open Code to copy one.
Matrix
Every Type, Tone and Size. on-color is shown on a brand fill.
import { Spinner } from "@nexera-ui/react";
const types = ["ring", "dots", "spokes"] as const;
const tones = ["brand", "neutral", "on-color"] as const;
const sizes = ["xs", "sm", "md", "lg", "xl"] as const;
export function Matrix() {
return (
<div className="flex flex-col gap-6">
{types.map((type) =>
tones.map((tone) => (
<div
key={`${type}${tone}`}
className={`flex flex-wrap items-center gap-6 rounded-md p-3 ${tone === "on-color" ? "bg-brand-primary" : ""}`}
>
<span
className={`text-body-caption w-32 ${tone === "on-color" ? "text-brand-on-primary" : "text-secondary"}`}
>
{type} · {tone}
</span>
{sizes.map((size) => (
<Spinner
key={size}
type={type}
tone={tone}
size={size}
label={`${type} ${tone} ${size}`}
/>
))}
</div>
)),
)}
</div>
);
}
Props 4
Press "Try it" on a card to load that prop into the playground.
4 props shown
typeNexera"ring" | "dots" | "spokes"Shape of the indicator.
toneNexera"brand" | "neutral" | "on-color"Colour set. Use on-color on a brand or dark fill.
sizeNexera"xs" | "sm" | "md" | "lg" | "xl"Size: 12, 16, 24, 40 or 56 px.
labelNexerastringAccessible name, for example "Loading payroll". When set, the spinner is a polite status region whose text is
announced; when omitted it is decorative (aria-hidden), for use inside a control that announces its own state.
* Required. React Aria props shown are the ones most apps use; the component accepts the rest of its React Aria props too.
Accessible by default.
Built on React Aria, and covered by the WCAG 2.2 evidence generated on every build.
WCAG 2.2 evidence
4 direct · 1 supporting- 1.1.1Non-text ContentLevel A · tested directly
- 1.3.1Info and RelationshipsLevel A · tested directly
- 2.3.3Animation from InteractionsLevel AAA · supporting test
- 4.1.2Name, Role, ValueLevel A · tested directly
- 4.1.3Status MessagesLevel AA · tested directly
Fits any width.
Nexera components respond to the space they are given. Drag the corner of the frame, or pick a width.
Styling hooks
Pass className to add Tailwind classes (merged last). State is exposed as data attributes, so you can style it with variants like data-pressed:.
<Spinner className="shadow-sm" />Used in blocks
Related components
- AlertAn inline status message about a section or a task: tone icon, title, optional description, actions and close button.
- BannerA page-wide notice across the top of a page or app shell: tone icon, message, optional link and close button on a solid fill.
- CircularProgressShows progress as a ring with the value in the centre.
- EmptyStateExplains why a list, table or page has no content and what to do next.
- ProgressBarShows how far a task has progressed.
- ProgressStepsA segmented progress indicator for a flow with a known number of steps, such as onboarding or a form wizard: a header with "Step 2 of 5" and the step title above one segment per step.
- SpinnerLabelA spinner with a status message.
- ToastGives the components below it a toast queue through `useToast()` and renders its `ToastRegion`.