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 —
liveandworkingmove. - Next to a name, where a full badge would be too loud.
Avoid when
- Inside a chip or a badge — pass
statustoChiporLabel. - 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 bylabel(arole="status"withlabelas hidden text underannounce). Say what the state means here ("Sync failed"), not the colour. neutral,liveandworkingdiffer in shape (ring, halo, arc), not only in colour.announceputs the dot in arole="status"live region, so a change oflabelis read once. Leave it off in lists; turn it on for the one state the user is waiting on.
Properties
Name
Type
Default
Description
announcebooleanfalsePuts the dot in a `role="status"` live region, so a change of `label` is
read once by screen readers. Off by default: a screen with twenty live
dots announcing at once is noise — turn it on for the one state the user
is waiting on.
label *stringnoneAccessible name — what the state means here ("Listening for runs",
"Sync failed"). Required: a dot on its own has no other text, and the
colour alone never carries the meaning. Inside a `Chip` or a `Label`,
use their `status` prop instead — their text names the state.
size"small""medium"'medium'Dot size. `small` (8px) next to `micro`/`xs` text, `medium` (10px) next
to body text.
status *"neutral""live""working""success""warning""danger""info"noneThe state shown. `live` and `working` move; the others are still.
Besides the props above, the dot accepts the native
<span>attributes and the grid placement props (area,alignSelf,justifySelf).