Skip to content
GitHub (opens in a new tab)

Spinner

Spinning circular loader for short waits of unknown length.

stableAtomcontracts/spinner.json

Preview

Spinner

Spinning circular loader for indeterminate waits. Not LoadingAnimation dot-grid. Not ThinkingAnimation.

Master

Medium spinner. Variants shows sizes, a label and inverse.

Usage

role=status with aria-live polite. Pass label for visible copy beside the spinner.

Do's

  • An inline action is processing (for a kit Button, set loading instead)
  • Short indeterminate page or panel load
  • Waiting state with no known percent

Don'ts

  • Square dot-grid compact wait — use LoadingAnimation
  • Assistant thinking — use ThinkingAnimation
  • Known percent completion — use Progress
  • An indeterminate bar that sits with the work — use Meter value=indeterminate
  • Placeholder layout while data arrives — use Skeleton
<Spinner />

Spinning circular loader for short indeterminate waits. One piece. Sizes 12, 16, 20. inverse for a primary fill. Distinct from LoadingAnimation dot-grid.

When to use

  • An inline action is processing (for a kit Button, set loading instead)
  • Short indeterminate page or panel load
  • Waiting state with no known percent

When not to use

  • Square dot-grid compact wait — use LoadingAnimation
  • Assistant thinking — use ThinkingAnimation
  • Known percent completion — use Progress
  • An indeterminate bar that sits with the work — use Meter value=indeterminate
  • Placeholder layout while data arrives — use Skeleton

What an agent reads

import { Spinner } from "agentic-ds-kit";
must
  • role=status with aria-live=polite
  • aria-label Loading when label is omitted
  • Visible label is not duplicated in aria-label
  • Reduced motion: the mark stays still and the label stays
defaults
  • size md
  • inverse false
stops if
  • Do not invent SpinnerIcon or merge Spinner into LoadingAnimation
  • Do not add Spinner as a LoadingAnimation variant
  • Do not change Button to accept spinner children
  • Do not use raw hex
  • Do not color a spinner by hand on a primary fill — set inverse

From contracts/spinner.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
sizesm | md | lgNomdsm 12px, md 16px, lg 20px.
labelstringNo—Visible label beside the spinner. When omitted, aria-label is Loading.
inversebooleanNofalseOn a primary fill: the mark and label use the on-primary ink. A kit Button with loading already draws its own spinner in the button ink.
  • Component
    →

    LoadingAnimation

    Square dot-grid loading indicator for compact waits.

  • Component
    →

    ThinkingAnimation

    Calm processing indicator for assistants and short system waits.

  • Component
    →

    Progress

    Task completion as a bar or circle from 0 to 100, or an indeterminate bar when the percent is not known.

  • Component
    →

    Meter

    How far along or how full something is, from 0 to 100, as a bar, a ring, or a half ring, with optional red, amber, and green zones.