Spinner

An indeterminate loading indicator drawn in the current text colour.

Usage

PreviewCode
Loading projects

Usage notes

  • Without label it is decorative and hidden from assistive technology — use it next to text that already says what is happening, such as a button reading “Saving…”.
  • With label it becomes role="status" and the label is announced politely, once.
  • It never sets aria-busy; mark the region that is loading yourself.
  • With reduced motion requested it turns more slowly instead of stopping, so the wait is still visible.

API Reference

InputTypeDefault
size SpinnerVariants['size'] 'md'
label string ''
class string ''

CVA variants

PropOptionsDefault
size sm | md | lg md

Component Source

Install via CLI:npx @voltui/cli add spinner
TypeScript
Loading editor…

Copy this code to your project. The component uses class-variance-authority.