1. Documentation
  2. Feedback
  3. Spinner
ReadmenpmGitHub
  • Introduction
  • Installation
  • Theming
  • Icons
  • Accordion
  • Card
  • Scroll Area
  • Separator
  • Sidebar
  • Field
  • Label
  • Input
  • Textarea
  • Number Field
  • OTP Field
  • Select
  • Combobox
  • Checkbox
  • Radio
  • Switch
  • Slider
  • Toggle
  • Calendar
  • Date Picker
  • File Upload
  • Button
  • Copy Button
  • Dropdown
  • Command
  • Tabs
  • Breadcrumb
  • Pagination
  • Tree
  • Table
  • Data Table
  • Stat
  • Timeline
  • Avatar
  • Status Bar
  • Badge
  • Meter
  • Empty
  • Skeleton
  • Spinner
  • Toast
  • Dialog
  • Sheet
  • Popover
  • Tooltip
  • Text
  • Kbd
  • Code Block
  • Utilities
  • Design rules

Spinner

An indeterminate loading indicator, stepped rather than smooth.

Loading documentation…

Skeleton< PreviousToastNext >

Powered by heyo

On this page

UsageIn contextAccessibilityProperties
LoadingLoadingLoadingLoadingLoading
<Spinner size="xs" /><Spinner size="sm" /><Spinner size="base" /><Spinner size="lg" /><Spinner size="xl" />

The glyph is eight discrete spokes, so it ticks from one to the next rather than rotating smoothly — a smooth rotation smears them into a grey ring. It is the same motion the rest of the system uses for "working on it", at every size.

Usage

tsx
import { Spinner } from "@heyo-sh/heyo-ui";<Spinner size="sm" label="Loading deployments" />;

In context

Most of the time you do not render a spinner directly: Button has loading, Command has loading, and DataTable draws skeleton rows. Use it on its own when something is loading that is not a control.

Loading

Checking the build…

<Button loading>Deploying</Button><div className="flex items-center gap-2 text-sm text-heyo-subtle"><Spinner size="sm" />Checking the build…</div>

Accessibility

label is rendered visually hidden and announced to screen readers. Give it one whenever the spinner is the only indication that something is happening — "Loading" on its own is better than silence, and "Loading deployments" is better than that.

Known duration?

If you can say how far along it is, say it: Meter is the bar, and it never leaves the reader guessing.

Properties

size"xs" | "sm" | "base" | "lg" | "xl"optional

12, 14, 16, 20 or 24px. It defaults to base.

labelstringoptional

Visually hidden text announced to screen readers.

classNamestringoptional

Merged into the glyph — usually to change its colour.