- Docs
- Components
- Feedback
Spinner
A short wait with no known end: a ring that turns. Read as a status, in the app's language.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<span role="status">Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Import
// From the package: a build keeps only what it uses.
import { Spinner } from "@qeetrix/react";
// Or from its own path.
import { Spinner } from "@qeetrix/react/spinner";02
Props
And every native attribute of the element it renders.
| Prop | Type | Default | What it does |
|---|---|---|---|
size | "sm" | "md" | "lg" | "xl" | "md" | 14, 16, 20 or 24px. |
tone | "neutral" | "brand" | "neutral" | neutral follows the text colour; brand is Ember. default is a deprecated alias of neutral. |
label | string | "Loading" | The accessible name; by default, the provider's string, in its language. |
decorative | boolean | false | Hidden, when something else announces the wait. |
03
Parts
Each part carries a data-slot, for tests and placement.
| data-slot | Element | What it is |
|---|---|---|
spinner | <span role="status"> | data-size, data-tone. |
04
A region loading
Mark the region aria-busy, and let one Spinner say so.
<section aria-busy={loading}>
{loading ? <Spinner label="Loading sessions" /> : <SessionList />}
</section>