Docs › Components

Spinner

An indeterminate loading indicator that takes the color and size of the text around it.

Sizes

Inline, it follows the surrounding text. Medium is 24px and large is 40px.

Example

Saving
Follows the page theme and corners

Usage

Give it a name that says what is loading. A Button shows one by itself while isPending.

import { Spinner } from '@snapshot-ui/react';

<Spinner aria-label="Loading results" size="md" />

Props

The size, and React Aria ProgressBar's labelling props.

aria-label
string

Defines a string value that labels the current element.

size
SpinnerSize

inline follows the surrounding font size; md is 24px and lg is 40px.

Default: 'inline'

Accessibility

Announced as an indeterminate progress bar. Under reduced motion it slows down rather than stopping, because a still spinner reads as finished.

esc

↑ ↓ to move↵ to open