Behive Tech Component Registry

Spinner

v0.4.4Stable

A loading spinner with size variants and accessible labeling.

pnpm add @behivetech/atoms.spinner

A loading spinner with size variants and accessible labeling.

A pure CSS animated loading indicator. Uses role="status" and aria-label so screen readers announce the loading state without visual output.

Usage

Open in new tab

Examples

Small

Open in new tab

Medium (default)

Open in new tab

Large

Open in new tab

Custom Label

Open in new tab

Accessibility

  • role="status" announces loading state to screen readers
  • aria-label carries the human-readable label (defaults to "Loading...")
  • The visible circle is aria-hidden="true" to avoid redundant announcements

Properties

Spinner props

PropTypeDefaultDescription
classNamestring—Additional class names to merge with the component root element
labelstringLoading...Accessible label announced to screen readers while loading
size"sm" | "md" | "lg"mdControls the size; defaults to md

Also accepts the native attributes of its root element (className, aria-*, event handlers, …).