v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

Spinner

A small loading indicator with a readable status.

Interactive preview

Loading project details

Usage

import { Spinner } from "@devvy-ui/react";

<Spinner label="Loading project details" />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
labelstringLoadingText announced by the status region.
sizesm | md | lgmdIndicator dimensions.
decorativebooleanfalseHide the spinner when another status already names the task.

Accessibility & behavior

Platform Behavior & Guidelines

The ring is decorative and its label is visually hidden inside a status region. Use decorative when placed next to an existing named status. Reduced motion and forced colors stop rotation. Replace it with content or an error when the operation finishes.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add spinner

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

Spinner.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.