Skip to the content

StatusDot

A small dot that says the state of the thing next to it — live, working, failed. Seven statuses with a fixed look; label is required, so the state is never colour-only. Chip and Label draw the same dot through their status prop.
Data Display

When to use

Use when
  • The state of a row, a table cell or a nav item: connected, running, sync failed.
  • A state that changes while the user watches — live and working move.
  • Next to a name, where a full badge would be too loud.
Avoid when
  • Inside a chip or a badge — pass status to Chip or Label.
  • Progress you can measure — use ProgressBar.
  • A page-level outcome ("Saved", "Error") — use Notification.

Usage

docs-sync
import { StatusDot } from '@apollion-dsi/core/elements/status-dot';

<StatusDot status="working" label="Syncing docs" />;

Statuses and sizes

What each status means is defined once on the Chip page. size follows the adjacent text: small is 8px (beside micro / xs text), medium (default) is 10px. Every status takes the same box, so dots line up in a column.

Motion

live pulses a halo and working turns an arc. Both run on the theme's indicator channel (theme.motion.indicator.pulse / .loop), which the global prefers-reduced-motion reduction skips: as for Spinner, the motion is the state. Retime it through the theme's motion.indicator input; it moves Spinner too.

Accessibility

  • The dot is role="img" named by label (a role="status" with label as hidden text under announce). Say what the state means here ("Sync failed"), not the colour.
  • neutral, live and working differ in shape (ring, halo, arc), not only in colour.
  • announce puts the dot in a role="status" live region, so a change of label is read once. Leave it off in lists; turn it on for the one state the user is waiting on.

Properties

Besides the props above, the dot accepts the native <span> attributes and the grid placement props (area, alignSelf, justifySelf).

See also