Spinner

A spinner component used to indicate loading or progress states in an application.

Usage & Examples

Default

default.tsx

  <Spinner />

Visual variants

Themes

primary
secondary
tertiary
quaternary

States

success
warning
error
info

Sizes

xs
small
medium
large

Variants

solid
outline
glass

Shadows

none
light
strong
visual-variants.tsx
// Themes

  <Spinner theme="primary" />

  <Spinner theme="secondary" />

  <Spinner theme="tertiary" />

  <Spinner theme="quaternary" />

// States

  <Spinner state="success" />

  <Spinner state="warning" />

  <Spinner state="error" />

  <Spinner state="info" />

// Sizes

  <Spinner size="xs" />

  <Spinner size="small" />

  <Spinner size="medium" />

  <Spinner size="large" />

// Variants

  <Spinner variant="solid" />

  <Spinner variant="outline" />

  <Spinner variant="glass" />

// Shadows

  <Spinner shadow="none" />

  <Spinner shadow="light" />

  <Spinner shadow="strong" />

Props API

15 props
Columns
Spinner props API
Default
Description
aria-busybooleanNoariatrueWhether the related region is busy. Defaults to true.
aria-describedbystringNoaria—ID of element(s) that describe the spinner.
aria-labelstringNoaria—Accessible label announced by screen readers. Falls back to `label`, then "Loading".
aria-labelledbystringNoaria—ID of element(s) that label the spinner. Takes precedence over `aria-label` when provided.
aria-live"off" | "polite" | "assertive"Noaria"polite"ARIA live region politeness. Defaults to "polite".
classNamestringNostyling—Additional class names for styling customization.
data-testidstringNotesting—Backward-compatible alias for test ID attributes.
labelstringNoprops—Optional visible label for the spinner.
roleReact.AriaRoleNoaria"status"Optional ARIA role. Defaults to "status".
shadowShadowTypeNostyling—Shadow style for the spinner. One of: "none" | "light" | "medium" | "strong" | "intense"
sizenumberNostyling50The size of the spinner (in pixels).
stateStateTypeNostyling—The state of the spinner. One of: "success" | "error" | "warning" | "info" | "disabled" | ""