Swatch
atomsA filled chip showing a colour: an image when labelled, decorative otherwise, and a pressable button with a selection ring for palette pickers.
Accent colour picker
interactive renders buttons, selected mirrors aria-pressed, label names each colour, a child glyph marks the automatic option.
Accent colour
Selected Indigo
Selected, decorative and legend
selected draws the ring on static or interactive swatches; without a label the swatch is aria-hidden so the adjacent text carries the name.
Healthy
Degraded
Down
Unknown
Props
| Prop | Type | Default | Description |
|---|---|---|---|
color required | string | — | Any CSS colour (or var()). |
size | ControlSize | 'md' | |
shape | 'circle' | 'square' | 'circle' | |
label | string | — | Accessible name; without it the swatch is hidden from assistive tech. |
selected | boolean | false | Draws the selection ring; `aria-pressed` when interactive. |
interactive | boolean | false | Renders a `<button>` and wires `onclick`. |
onclick | (e: MouseEvent) => void | — | |
class | string | '' | |
children | Snippet | — | Optional glyph drawn over the colour (e.g. an "A" for auto). |