Default
Show the codeHide the code
Default, code
<Spinner />An indeterminate wait, announced politely with its label.
These are the real React components. Use them with a mouse, touch or keyboard, and switch the theme and density for every example at once.
Default, code
<Spinner />With a visible label, code
<Spinner label="Loading invoices" showLabel />The 3 design tokens Spinner reads, with the value each has in the theme and density chosen above. Change a token and the component follows, in Figma and in code.
| Token | Value now | CSS variable |
|---|---|---|
| color.icon.default | … | --sd-color-icon-default |
| color.text.secondary | … | --sd-color-text-secondary |
| spacing.gap.sm | … | --sd-spacing-gap-sm |
The npm package isn’t published yet. When it is, this is the install line; until then, this page runs the same build of the package (from commit fa3abf8).
Install
npm i @superduperui/react @superduperui/tokensImport
import { Spinner } from "@superduperui/react"Spinner also takes the props of the React Aria component it’s built on.
| Prop | Type | What it does |
|---|---|---|
label | stringDefault 'Loading' | What is loading, read once by screen readers ("Loading invoices"). Default "Loading". |
size | IconSizeDefault 'md' | sm 16px, md 20px (default), lg 24px. |
showLabel | booleanDefault false | Show the label next to the spinner as well. Default false (screen readers only). |
className | string |
Screen readers announce "Loading invoices" (status).
WCAG 2.2 AAA criteria the component meets in Comfortable density: 1.4.6, 1.4.9, 2.3.2, 2.3.3.
Not interactive: density changes spacing only.
Shared patterns it ships with: 2.3.2 (well under 3 Hz; 1.5 s loop under reduced motion).
| axe-core (WCAG A, AA, AAA and best practice) | 60 runs across every story, theme, density and width: 0 violations |
|---|---|
| Rendered text contrast | 55 text runs: 0 below 7:1, lowest 11.42:1 |
| Target size | 0 targets: 0 under 44px in Comfortable |
| Focus appearance (2.4.13) | 0 focus stops in 0 browser engines: all pass |
Manual passes with VoiceOver and NVDA haven’t been done yet.
The Figma component is Spinner, with Size (Small, Medium, Large). The Figma library isn’t published yet.
Figma to code: Size → size (Small = "sm", Medium = "md", Large = "lg"); Show label → showLabel; Label → label.