Spinner
Indicates loading or an asynchronous action is being performed
Default
What you get out of the box with this component is a pretty basic loading spinner:
Editable example
Best practices
- When loading content, use a spinner for cases where the size of the loaded content is undetermined beforehand.
- For the
Button
specifically, rather than implementing a bespoke spinner, set thebuttonState
prop toButtonState.Waiting
.
Sizes
The Spinner
comes in three sizes: small, medium and large.
Editable example
Adding a message
You can add a message or explainer above the spinner with the message
prop; by default no message is set.
Editable example
Primary
To draw attention to a spinner, you can add the primary
property,
which will indicate that this is the primary loader blocking any actions on a page.
Editable example