Skip to main content
  1. Docs
  2. Components
  3. 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

spinner.tsx
// 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.

PropTypeDefaultWhat 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.
labelstring"Loading"The accessible name; by default, the provider's string, in its language.
decorativebooleanfalseHidden, when something else announces the wait.

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat 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.

sessions.tsx
<section aria-busy={loading}>
  {loading ? <Spinner label="Loading sessions" /> : <SessionList />}
</section>
Next — SpinnerAccessibility