Spinner

A React component in Beamline's Feedback category, in the free sample.

A ring that spins while work runs and closes into a drawn check or cross when it ends.

Use it for

  • Short indeterminate work tied to one row, button or step.

Not for

  • Page loading → skeleton.
  • Known progress → progress.

Anatomy

  • track
  • arc
  • check / cross

Variants

  • size: sm, md, lg

States

  • loading
  • success
  • error
  • waiting to show (delay)

Keyboard

  • role=status while loading; role=img with Done/Failed after.

Motion

The loading ring rotates while visible; managed/OS reduction holds the ring still. Success/error retains a meaningful shape and label; draw and arc use semantic timings. With a delay the ring stays unseen for that long, then fades in over --pui-fade-in.

Props

PropTypeDefaultDescription
state'loading'|'success'|'error'—`success` draws a check out of the ring, `error` a cross; both stop spinning.
size'sm'|'md'|'lg'—Control size within the supported size steps. Defaults to "md".
labelstring—Accessible name while loading.
delaynumber0ms to wait before it shows: work that ends sooner never flashes a spinner (about 300 is a good start). Default 0.
classNamesSpinnerClassNames—Classes for the named visual parts; no part overrides by default.
style / refCSSProperties / native Ref—style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default.
classNamestring—Classes on the documented visual root; no override by default.
refRef<HTMLSpanElement>—Receives the documented root element; no ref by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.

Used in

Dependencies

motion

Import

import { Spinner } from "@beamline/spinner";

Get it

Spinner is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Spinner is included in the free MIT sample. Get Beamline · Connect your agent

More in Feedback

  • Timer: A duration that counts down (or up) from your clock: Start, Pause, Resume, Reset and the finish reported once; the time left drawn as a bar you drag (or…
  • Notification centre: Updates that wait to be read: a bell with the unread count opens All / Unread, new and earlier groups, and per item mark read or dismiss.
  • Usage meter: An allowance and what fills it: one bar split by source, the room left, a warning near the limit and the overflow in its own red well past a notch at the…
  • Alert: A message that stays until it is dealt with: what happened, what to do, an action; danger and warning are announced; dismissing folds its height away.
  • Cookie consent: Asks once which cookies a visitor allows, with Reject all and Accept all given equal weight; Customise grows the notice in place into each category with…
  • Empty state: What a place will hold and the first step to fill it, instead of a blank; a compact size for panels and filtered tables.
  • Announcement bar: A banner across the top for news and offers: messages take turns, a countdown ticks, and dismissing folds it away and can remember it.
  • Progress: How much of a known task is done, or a moving bar when the length is unknown, with an optional label and value.
  • Skeleton: Holds the shape of content while it loads, then crossfades into it, so nothing jumps.

Guides: Evaluate Beamline UI with a settings screen and real data

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.