Spinner
An indeterminate loading indicator drawn in the current text colour.
Usage
Usage notes
Without labelit 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 labelit becomesrole="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
| Input | Type | Default |
|---|---|---|
| size | SpinnerVariants['size'] | 'md' |
| label | string | '' |
| class | string | '' |
CVA variants
| Prop | Options | Default |
|---|---|---|
| size | sm | md | lg | md |
Component Source
Install via CLI:
npx @voltui/cli add spinnerTypeScript
Loading editor…
Copy this code to your project. The component uses class-variance-authority.