Spinner
Indeterminate wait after a user action. Prefer Button loading for submits; Skeleton for a known layout.
Default
md is 20px. Color inherits currentColor, defaulting to gray-1000.
1
<Spinner />
Sizes
Named sizes map to 16, 20, 24, 32, 36, 48, and 64. A number is pixels.
Colors
Tint with text-* on design tokens. The ring uses currentColor.
Best practices
- Use Spinner for an indeterminate wait of about one to three seconds: an icon refresh, a row retry, pagination. Named sizes stay on the control, not the parent pane.
- On a submit control, set Button
loading. Do not nest a Spinner inside the button by hand. - Known layouts use Skeleton. Inline copy uses Loading Dots. Known totals use Progress.
- Mount the Spinner when the action starts. Toggling visibility on a pre-rendered spinner leaves a half-rotated ring at idle.
- After about a second, pair the ring with copy that names the work: Verifying…, Deploying….
- Set
aria-busy="true"on the in-flight region. Keep the original trigger focusable. The SVG isaria-hidden.