Spinner
The Spinner component is a loading indicator that you can use to show users
that a process is in progress; the application is working on something, and
they should wait for the process to complete.
Usage
To use it in your app, import the Spinner from the package:
import { Spinner } from "@wordpress/components";Then, simply add it in your app, as follows.
<Spinner />Label
The default label provided for the screen readers will “loading”. You can customize the label by passing the label prop with a new value, for example to indicate what is being fetched:
<Spinner label="Fetching posts" />Size
The Spinner component size is customizable. By default, it will be 24px square. You can change the size by passing a number to the size prop.
<Spinner size={48} />Styles
The Spinner component has static classes, prefixed with .kubrick-Spinner-. You can use these static classes to
select and customize the component and its elements.
| Selector | Description |
|---|---|
root | The component root element. |