Skip to content

Spinner

Animated indicator for a loading state.

Browsers
Chrome 123+Firefox 121+Safari 17.5+
Tier
0
Bundle compressed
447 B
Forced layout budget
0 ms
Axe budget
0
SSR compatible
Yes
Published contract
Test harness

Playground

Spinner

Sizes

Label

Loading content
Loading content

Value

API

Spinner

PropTypeDefaultDescription
asElementType"div"Changes the rendered root tag, for example as="span".
classNamestring—Class names are forwarded to the root element for client-side styling.
align"center" | "fixed" | "absolute"—Positions the spinner in normal flow, fixed to the viewport, or absolutely.
childrenReactNode—Visible content rendered alongside the status region's accessible name.
valuenumber—Fixed 0–100 percentage. Replaces the animation with a static arc and switches the role to progressbar.
delaynumber0Milliseconds to wait before the spinner appears, applied in CSS so it needs no JavaScript.
labelstring"Loading"Accessible name announced by the status region.
showLabelbooleanfalseRenders the visible label as a [data-part="label"] part.
size"small" | "default" | "large""default"Controls the CSS-only spinner diameter.
renderReactElement | ((props, state) => ReactElement)—Replace the rendered element while keeping behavior and accessibility wiring.

Keyboard

KeyAction

Accessibility

Uses a role="status" live region with an aria-label. The visual indicator is CSS-only and does not render SVG.

Styling hooks

data-uiify-spinnerdata-statedata-delaydata-valuedata-sizedata-aligndata-part="label"--uiify-spinner-tail--uiify-spinner-length