SpinnerA visual indicator of a loading or processing state.
Install the component from your command line.
Import and usage.
The
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
The Spinner component also supports custom
npm install @raystack/apsara
import { Spinner } from '@raystack/apsara/v1' <Spinner size={3} />
Spinner
component accepts the following props:
size
: Size of the spinner (1
|2
|3
|4
|5
|6
, default: 1)color
: Color variant of the spinner ("default"
|"inverted"
, default: "default")className
: Additional CSS class names- All other HTMLDivElement attributes from React
size
prop. The available size options are:
loading...
color
prop.
loading...
className
prop.
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.