Skip to content

Spinner

Preview Available in release assets

Announce an indeterminate wait with a small CSS-only rotating indicator whose accessible name explains what is loading.

Spinner primary example

Show code
<p class="thin-cluster" style="align-items: center">
  <span class="thin-spinner" role="status" aria-label="Loading results"></span>
  <span aria-hidden="true">Loading results…</span>
</p>

Each authored example uses the production assets and includes copyable markup.

Anatomy

  • Inline host element with class="thin-spinner"
  • Accessible name from role="status" plus aria-label or an associated text label
  • Optional visible descriptive text next to the spinner
  • Currentcolor-driven ring with a leading accent quadrant

Variants and sizes

  • Default 1.25em ring inheriting text color — shown above
  • Small (data-size="small", 1em) — shown above
  • Large (data-size="large", 2rem) — shown above
  • Tone overrides (data-tone="neutral|success|warning|danger") — shown above
  • Decorative marker paired with authored visible label (aria-hidden="true") — shown above

Rendered fixtures exercise authored content and constrained layouts with the same production assets.

  • Default rotation — shown above
  • Reduced-motion slower rotation — shown above
  • Forced-colors system CanvasText and Highlight — shown above
  • Right-to-left content — shown above
  • Inline inside a button or link — shown above
  • 200% and 400% zoom — shown above
  • Placed on a raised or accent surface — shown above

Interaction and keyboard behavior

The spinner owns no interaction. Any cancel, retry, or dismiss control is authored separately as a native button or link.

Accessibility

Give the spinner an accessible name that describes what is loading, either through role="status" with aria-label on the host or by placing it inside an element whose visible text is announced. When a visible loading label already exists, mark the spinner aria-hidden="true" to avoid duplicate announcements. Never rely on rotation alone to communicate that a task is in progress.

Contract
NATIVE
Basis
Styles native HTML elements; no APG widget

API

Use any inline element with class="thin-spinner". Add role="status" and aria-label for a self-describing spinner, or aria-hidden="true" when a sibling label carries the announcement. Size the ring with data-size="small|large" or by overriding --thin-spinner-size; recolor with data-tone or by setting color on an ancestor.

Behavior tier: css-only

Custom properties

PropertyDefaultDescription
--thin-spinner-size1.25emInline and block size of the spinner ring.

Fallback

Without Thin-Sky CSS, the accessible name and any adjacent visible text still communicate that a task is in progress; no rotation is required for the announcement.

Assets and dependencies

  • /components.css

Dependencies: None

Source: packages/ui/src/items/spinner/style.ts

Composition

Derived from the examples and style specs, not authored.

Composes