Skip to content
Alea0.1

Data display

Status and ColorSwatch

A colored dot with words for service health or presence, and a color sample with its name.

Ant Design: Badge status

import { Status, ColorSwatch } from '@alea/ui';

Examples

Status and swatches

Words with every color.

OperationalDegradedOutageOffline
var(--alea-purple-400)var(--alea-yellow-200)#8b6cf080

Props

Status props

A colored dot with a label: service health, presence, deploy state (Chakra Status, Spectrum StatusLight).

PropTypeDefaultDescription
childrenrequiredReactNode-The words: the color is never the only signal.
classNamestring-
pulseboolean-Breathe, for live states (pulse pattern; stops with reduced motion).
tone"danger" | "success" | "warning" | "accent" | "info" | "neutral"'neutral'The state: success (online, live), warning (degraded), danger (down), neutral (offline), info.

ColorSwatch props

A color sample, with a checkerboard under transparent colors (Mantine ColorSwatch, Chakra ColorSwatch).

PropTypeDefaultDescription
colorrequiredstring-Any CSS color, or a token: var(--alea-accent).
labelrequiredstring-Name for screen readers ("Orchid, purple 400").
classNamestring-
shape"circle" | "square"'circle'circle (default) or square.
showValueboolean-Shows the name and the value under the swatch.
sizenumber28Size in px. Default 28.
styleCSSProperties-

Accessibility

  • Status always has words: the color is never the only signal.
  • ColorSwatch is an image named after the color.

Do and don't

Do

  • Use pulse only for live states.

Don't

  • Don't show a status dot without its label.
Tested with axe, keyboard and screen reader roles