VisorVisor
ComponentsData Display

Spinner

Loading indicator — an inline rotating ring, or a dotted thinking-orb for waits over larger surfaces.

Default

A md spinner with the default tone (text-tertiary leading edge).

Sizes

Three sizes — xs (12px), sm (16px), and md (24px) — fit inline alongside text or inside buttons.

Tones

default uses --text-tertiary for the leading edge. primary uses the --primary brand token.

With Label

Pass a label to make the spinner meaningful to screen readers. It renders role="status" with a visually-hidden label string. Without a label the spinner is aria-hidden="true" (decorative).

Loading results…

Visible Words

Add showLabel to show the label as words beside the spinner. The spinner and the words sit in one role="status" wrapper, so a screen reader hears the words once. The words read --spinner-label-color, which falls back to --text-secondary, so they follow the theme's ink in light and dark.

Loading your form

Delay

Pass delay in milliseconds and the spinner shows nothing until the wait passes, then fades in. A load that finishes first never flashes it. With showLabel, the words fade in with the spinner. The delay is a CSS animation-delay, so the server renders the same markup as the client. With prefers-reduced-motion: reduce, the ring stops turning but still fades in.

LoadingLoading your form

In Five Looks

The same delayed spinner in each look, on the theme picked in the docs. Reload the page to watch the wait.

Today
Dark
Dark + Photo
Light
Light + Photo

Theme Glyph

A theme can draw a glyph in place of the ring, such as a kit's notched circle icon. Set components.spinner.glyph to a mask image. The spinner keeps its size, place and turn and fills the glyph's shape with ink. A theme that leaves the key unset keeps the border ring, unchanged.

components:
  spinner:
    glyph: 'url("data:image/svg+xml,%3Csvg xmlns=''http://www.w3.org/2000/svg'' viewBox=''0 0 256 256''%3E%3Cpath d=''M236,128a108,108,0,0,1-216,0...''/%3E%3C/svg%3E")'
    glyph-color: "#ffffff"   # optional
  • Use a data: URI. A URL to a file resolves against the stylesheet that sets it, which moves with the theme.
  • The glyph is drawn edge to edge in the spinner's box, so draw it on a square view box.
  • The default tone inks the glyph with glyph-color, or the surrounding text colour when unset. The primary tone uses primary-edge-color, like the ring's primary edge.

All spinner keys are listed under Component Tokens.

Orb

variant="orb" swaps the ring for a dotted thinking-orb, drawn on a canvas by thinking-orbs. The ring belongs inline, beside a button label. The orb is for a wait over a large visual, like a card re-rendering under a scrim or an agent thinking.

The orb reuses size, mapped to the orb's own presets: xs is 20px, sm is 32px, and md is 64px. 20 and 64 are hand-tuned designs rather than a scale factor. 32 is interpolated between them.

xssmmdringorb

States

Pick the animation with orb. All nine states render at every size, shown here at md, sm, and xs.

workingparticles on tilted orbits
searchinga scan meridian sweeps a globe
solvingbands scramble, then click back
listeninga waveform rolls through rings
connectinga constellation wires itself
weavingthree strands plait the sphere
composingan undulating multi-band sash
breathinga ring slowly morphing
shapingcircle → triangle → square

Primary tone

By default the orb's ink follows the text colour of wherever it sits. tone="primary" tints it with the --primary brand token and keeps the orb's depth shading.

workingparticles on tilted orbits
searchinga scan meridian sweeps a globe
solvingbands scramble, then click back
listeninga waveform rolls through rings
connectinga constellation wires itself
weavingthree strands plait the sphere
composingan undulating multi-band sash
breathinga ring slowly morphing
shapingcircle → triangle → square

Over a scrim

Because the ink follows the surrounding text colour, set the text colour on a dark scrim and the orb draws light ink in both modes. The label contract works exactly as it does for the ring.

Rendering share card…Rendering…

With prefers-reduced-motion: reduce, the orb renders one still frame instead of animating. It also pauses while it is offscreen or the tab is hidden.

Installation

npx visor add spinner

This copies three files into your project and installs thinking-orbs:

  • components/ui/spinner/spinner.tsx — the component
  • components/ui/spinner/spinner-orb.tsx — the orb variant (a client component)
  • components/ui/spinner/spinner.module.css — the styles

Usage

import { Spinner } from '@/components/ui/spinner/spinner';

{/* Decorative — inside a button */}
<Spinner size="sm" tone="primary" />

{/* Accessible — standalone loading indicator */}
<Spinner size="md" tone="primary" label="Loading data…" />

{/* Visible words that fade in after 600ms, so a quick load never flashes */}
<Spinner label="Loading your form" showLabel delay={600} />

{/* Orb — a wait over a large visual */}
<Spinner variant="orb" orb="working" label="Rendering preview…" />

API Reference

SpinnerProps

PropTypeDefaultDescription
size'xs' | 'sm' | 'md''md'Ring size. xs=12px, sm=16px, md=24px.
tone'default' | 'primary''default'Color treatment for the leading edge. default uses --text-tertiary, primary uses the --primary brand token.
labelstring—Accessible label. When provided, renders role="status" with visually-hidden text. When omitted, aria-hidden="true" (decorative).

The component also accepts all standard <span> HTML attributes.