Spinner
A visual indicator of a loading or processing state.
Usage
The Spinner component provides a way to show a spinner.
Spinner Props
Prop | Type | Default |
---|---|---|
size | 1 | 2 | 3 | 4 | 5 | 6 | 1 |
color | "default" | "inverted" | "default" |
className | string | - |
Examples
Size
The Spinner component offers different size options. You can customize the size of the spinner using the size
prop. The available size options are:
Color
The Spinner component offers two color options. This is mainly helpful if we want to render the Spinner inside another component with lighter or darker background color. Spinner uses a color
prop.
Accessibility
The Spinner component includes appropriate ARIA attributes for accessibility:
role="status"
: Indicates that the element is a status indicator.aria-hidden="true"
: Hides the spinner from screen readers, as it's a visual indicator only.