Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Spinner

A pending form action with visible saving feedback.

Preview

Live preview

Changes apply to this preview only.

Activity and feedback

Example activity indicatorAn indeterminate status with a readable label.

Try a local asynchronous action.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Appearances

circular, dots and arc.

Open preview

Sizes

xs to xl.

Open preview

Variants

inherit takes the current text color; the others use a semantic token.

Open preview

Usage

Pair indefinite activity with explanatory text and disable duplicate submissions deliberately.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluSpinnerProps

Type source
PimoluSpinnerProps public API
NameTypeDefaultDescription
appearance"circular" | "dots" | "arc" | undefined"circular"Visual style of the loading indicator.
size"xs" | "sm" | "md" | "lg" | "xl" | undefined"md"Spinner size.
variant"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | "inherit" | undefined"inherit"Semantic color or inherited text color.
labelstring | undefined"Loading..."Accessible loading message.
decorativeboolean | undefinedfalseHide the Spinner from assistive technology.
onChangeChangeEventHandler<HTMLSpanElement, Element> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLSpanElement> | undefined—Standard React/HTML attribute.
appearance

"circular" | "dots" | "arc" | undefined

Default: "circular"

Visual style of the loading indicator.

size

"xs" | "sm" | "md" | "lg" | "xl" | undefined

Default: "md"

Spinner size.

variant

"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | "inherit" | undefined

Default: "inherit"

Semantic color or inherited text color.

label

string | undefined

Default: "Loading..."

Accessible loading message.

decorative

boolean | undefined

Default: false

Hide the Spinner from assistive technology.

onChange

ChangeEventHandler<HTMLSpanElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLSpanElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Provide a useful busy message and respect reduced motion without losing status information.
Read the accessibility guide →