Design System
Feedback

Spinner

An indeterminate loading indicator. Inside a button it sits alongside the label rather than replacing it, so the width does not jump.

Purpose

Use a Spinner when the wait is real but unmeasurable — a save in flight, a search running. When you can measure it, or the wait has a shape, reach elsewhere:

Use it for

  • A pending action inside its button ("Saving…")
  • A block of content that is fetching
  • Short, unmeasurable waits

Reach for something else

  • Known progress (upload percentage) → Progress
  • Content whose layout is known while it loads → Skeleton

Sizes

sm is a neutral 16px ring for dense UI — buttons, table cells. md and lg are the brand motion tier: the HMS triangle mark draws itself, a dash chasing the path over a faint track. Colour comes from currentColor, so set a text colour on the wrapper.

sm · ring
md · brand
lg · brand

In a button

The spinner sits beside the label, never in place of it — the button keeps its width, and the words say what is happening.

Block loading state

For a loading region, centre a brand-size spinner and say what is loading.

Loading claims…

Structure

PropertyValue
Sizes16px sm · 24px md · 40px lg
sm2px ring in currentColor with a transparent top, continuous spin
md/lgHMS triangle mark, stroke-drawn: a 60-unit dash chasing the path (--animate-brand-draw) over a 20%-opacity track
ColourcurrentColor — set a text colour on the wrapper (e.g. text-primary-strong)
MotionUnder prefers-reduced-motion the animation stops; the mark renders static

Best practices

Do

  • Pair it with words wherever space allows — "Saving…", "Loading claims…".
  • Set label to the actual activity ("Saving", "Searching") — it is what screen readers hear.
  • Use sm inside buttons and table cells; reserve md/lg for block loading states.
  • Disable the owning button while it shows a spinner.

Don't

  • Replace a button's label with a spinner — the width jumps and the meaning disappears.
  • Use a spinner where the layout of the incoming content is known — Skeleton holds the space better.
  • Use it for measurable progress — that is Progress.
  • Show several spinners in one view; one per loading region at most.

Accessibility & keyboard

  • Renders role="status" with aria-label (default "Loading") — screen readers announce it politely without interrupting.
  • The animated visuals are aria-hidden; only the label is exposed.
  • Honours prefers-reduced-motion: the animation stops and the mark renders static.
  • Not focusable and has no keyboard interaction — it is pure status output.

Props

Spinner also accepts every native <span> attribute.

PropTypeDefaultDescription
size"sm" | "md" | "lg" | undefined"md"Visual size: `sm` (16px), `md` (24px), `lg` (40px). All sizes use the brand triangle mark with a stroke-draw animation — the "peak" draws itself. `sm` carries a slightly heavier relative stroke so the mark keeps its weight in dense UI (buttons, table cells).
labelstring | undefined"Loading"Accessible label announced to screen readers.

On this page