Skip to content

Spinner

Loading indicator. Respects `prefers-reduced-motion`.

Data Display·Available inReactVueAngular·View as Markdown

Preview

tsx

Switch the framework picker (top-right of the panel) to render the same demo live in React, Vue, or Angular — same class names, ARIA, and visual output across all three.

Playground

Flip props to see how the component responds. The snippet below updates as you change options.

Installation

Sisyphos UI ships unified packages for React, Vue, and Angular. Pick the one that matches your stack — every framework exports the same component classes, ARIA semantics, and CSS tokens.

$ pnpm add @sisyphos-ui/react

Then import the bundled stylesheet once at app entry: import "@sisyphos-ui/react/styles.css";

Usage

Idiomatic usage in each supported framework
import { Spinner } from "@sisyphos-ui/react";

export const Loading = () => <Spinner size="md" color="primary" />;

Sizes

tsx

Variants & thickness

Pick between `ring`/`double` styles, tune stroke weight with `thickness`, and pass a `label` for screen readers.

tsx
ring (default)
double
thickness=5
with label (a11y)

API

PropTypeDefaultDescription
size"xs" | "sm" | "md" | "lg" | "xl""md"Spinner dimensions.
color"primary" | "success" | "error" | "warning" | "info" | "neutral" | "inherit""primary"Stroke color; `inherit` uses `currentColor` (useful inside buttons).
thicknessnumber3Ring thickness in px.
variant"ring" | "double""ring"Single rotating arc, or outer arc plus counter-rotating inner arc.
labelstring"Loading"Accessible label announced to screen readers.

The full API including refs, ARIA attributes, and HTML passthroughs lives in the package README on npm.

Accessibility

  • The root exposes role="status", an implicit polite live region, so assistive tech is notified when the spinner appears.
  • A screen-reader label is always present via aria-label (label prop, defaults to "Loading").
  • The SVG artwork is aria-hidden="true" and focusable="false" — only the label is announced, and the spinner never receives focus.
Need more?View on npm →
Was this page helpful?