Display & Navigation · Spinnerstable
Spinner
A rotating ring that signals a short, indeterminate wait, in three sizes with default and white colours and an optional label.
Preview
#previewSwitch size, colour and label. Show code opens the React and CSS below.
size large · default · label none
spinner-example.tsx
import { Spinner } from "@blade-ai/weft/components/spinner";
export function Saving() {
return (
<Spinner
size="large"
accessibilityLabel="Saving"
/>
);
}All states
#all-statesEvery size in default and white, with the label below and to the right. White sits on a dark surface.
Medium · default
Medium · white
Loading
Medium · label bottom
Loading
Medium · label right
Large · default
Large · white
Loading
Large · label bottom
Loading
Large · label right
Xlarge · default
Xlarge · white
Loading
Xlarge · label bottom
Loading
Xlarge · label right
Props
#propsOther span attributes pass through to the root.
Prop
Type
Default
Description
size
"medium" | "large" | "xlarge"
"medium"
Ring diameter: 16 / 24 / 32px.
color
"default" | "white"
"default"
white is for dark or filled surfaces.
label
string
—
Visible text next to the ring. Without it the ring is announced with accessibilityLabel.
labelPosition
"bottom" | "right"
"bottom"
Where the label sits relative to the ring.
accessibilityLabel
string
"Loading"
Announced name when there is no visible label.
className
string
—
Extra classes on the root.
Usage
#usageShort rules for using spinner.
Do
Use it for waits that are short and of unknown length.
Add a label when the wait could confuse people.
Use white on dark or filled surfaces.
Put it where the content will appear.
Don't
Don't use it when you can show progress; use Progress Bar.
Don't use it for whole-page loads; use Skeleton Loader.
Don't leave it spinning with no timeout or error path.
Don't use white on a light surface.
Accessibility
#accessibilityA polite live status. The label, or accessibilityLabel, is the announced name.
Keyboard
Key
Action
—
Not focusable. Spinner is a read-only status and takes no keyboard input.
ARIA
Element
Role / attribute
When
Root
role="status", aria-live="polite"
Always.
Root
aria-label
When there is no label; defaults to "Loading".
Ring
aria-hidden="true"
Always; decorative.
Spin
prefers-reduced-motion
Slows to a 2.4s turn for reduced motion.