Status Indicator
Compact status readout with a shape-coded status marker and uppercase label. Renders role=status for assistive technologies.
Installation
dgadd ships in @diffgazer/add on npm: pnpm add -D @diffgazer/add puts it on pnpm exec, and npx @diffgazer/add runs it without the install.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS from the installed package.
Usage
Examples
Inline in a panel header and rows
API Reference
StatusIndicator
Accessibility
Notes
Pulse
Pulse defaults to true, but the dot only animates when status='online' (a compound variant in statusIndicatorDotVariants). Set pulse={false} to disable animation. Honors prefers-reduced-motion via motion-reduce:animate-none.
Shape and color
Every status carries its own marker shape so the states stay apart without relying on hue: online is a filled circle (success), busy is a filled square (warning), offline is a hollow circle (muted-foreground). The shape also keeps online readable mid-pulse, when its opacity dips toward the offline tone.
Accessible status word
The marker is decorative (aria-hidden), so the root renders an sr-only status word (defaulting to the status value) for screen-reader users. Override the word with the label prop, or pass label={null} to suppress it when the visible children already state the status.
Live region
The root renders role="status" — an implicit polite live region — so screen readers announce label changes without interrupting.
Source
Install via CLI: pnpm exec dgadd add ui/status-indicator.
Highlighted source loads after this disclosure opens. Browse the source repository.