This page as markdown: /spinner.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

Spinner

Status: stable

Pure SVG activity indicator. No Base UI, no icon dependency — a role=status ring (faint track + rounded-cap arc) that inherits the current text color. Size with the size prop (sm / md / lg), color with text-*.

Keywords: spinner, loading, pending, indeterminate

Usage

Use Spinner for short indeterminate waits where the user cannot know exact progress.

Best practices

Props

Name Type Default Description
label string "Loading" Accessible label announced by screen readers while visible (sets aria-label on the role=status element).
appearance "ring" | "dots" "ring" ring is the default indicator; dots are three bouncing dots, softer, for chat and inline text.
size "sm" | "md" | "lg" "md" One scale for both appearances: ring 14 / 16 / 24px, dots 4 / 6 / 8px.
className string — Color (text-); the ring's strokes use currentColor, so it follows the text color. Size with the size prop — a size- class still overrides the ring for an off-scale context (Button sizes its own spinner this way), but is not the way to pick a size.

Variants

Tokens used

foreground, muted-foreground, primary-foreground

Motion

Accessibility

Related

Examples

Dots

import { Spinner } from "@sableui/react"

<Spinner appearance="dots" label="Assistant is typing" className="text-muted-foreground" />

Default

import { Spinner } from "@sableui/react"

<Spinner />

Sized + tinted

import { Spinner } from "@sableui/react"

<Spinner size="lg" className="text-muted-foreground" />

Inside a button (Button owns it — use loading)

import { Button } from "@sableui/react"

<Button loading>Saving</Button>