Spinner

Shows that something loads.

Source

Sizes and color

Use md (the default) in most places and sm in dense UI, such as next to small text. The spinner takes the current text color.

sm · dense UI
Loading insights
md · default
Loading insights
lg · 20px
Loading insights
Text color
Loading replaysLoading replays

Usage

These are defaults, not laws. Break one when you have a good reason, or when it makes the design more cohesive or more interesting.

  • Set label to say what is loading.
  • For a button action, use the button's loading prop. For content that loads, use Skeleton.

API

Props that the library adds. Every part also takes all the Base UI props.

Spinner

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'The spinner diameter.
labelstring'Loading'The accessible status label.
classNamestring–Classes for the spinner.