Badge
atomsThe single pill: semantic tones or any colour for state, mono for metadata, removable or action-bearing for tags, numeric for counters.
Fleet status row
tone for health, dot for a live indicator, mono for a region, numeric for a counter and removable tags on a filter bar.
Filters region:eu-west-1 role:worker
api-gateway eu-west-1
23% healthy
worker-02 eu-west-1
87% degraded
cache-01 us-east-1
4% down
postgres-primary eu-west-1
38% healthy
Tones, sizes and shapes
tone or color sets the tint; border={false} is the soft fill; variant="solid" fills the pill with the tone; variant="text" drops the chip; size xs, sm, md; uppercase, mono, dot and icon decorate.
neutral ok warn danger info accent muted violet color
neutral ok warn danger info accent muted violet
xs sm md 8 128 1024
stable ~/projects/tsumikit text · 12:34 passed system pending
neutral ok warn danger info accent muted violet color
Interactive, removable, removed and overflowing
as="button" with active for a toggle, href for a link, removable with onremove, actionIcon for another trailing action, removed for a restorable tag, truncate with maxWidth.
API_KEY DATABASE_URL SENTRY_DSN
a very long account name that clips feature/very-long-branch-name-that-clips A block badge fills its row, for a banner-like notice
Tone × style matrix
Regression fixture: every tone as outlined chip, soft fill, text variant and active button.
neutral soft text dot 42
ok soft text dot 42
warn soft text dot 42
danger soft text dot 42
info soft text dot 42
accent soft text dot 42
muted soft text dot 42
violet soft text dot 42
Props
| Prop | Type | Default | Description |
|---|---|---|---|
tone | Tone | 'neutral' | |
color | string | — | Any CSS colour (or var()) for a one-off tint; overrides `tone`. |
as | 'span' | 'button' | 'a' | 'span' | |
href | string | — | Renders an anchor (implies `as="a"`). |
external | boolean | false | Opens in a new tab with a trailing arrow glyph. |
size | 'xs' | 'sm' | 'md' | 'md' | `xs` is the densest form for counters in tight rows. |
variant | 'chip' | 'text' | 'solid' | 'chip' | `text` drops the chip (no fill, ring or padding) but keeps badge typography and tint — for mono metadata that must not read as a pill. `solid` fills the pill with its tone (accent when there is none). |
mono | boolean | false | |
uppercase | boolean | false | Uppercase, letter-spaced label — for status tags/eyebrows. |
numeric | boolean | false | Tabular digits with a minimum width so counters don't jitter. |
truncate | boolean | false | Clip long content with an ellipsis instead of overflowing. |
maxWidth | string | — | |
border | boolean | true | Borderless "soft" variant: tone-tinted fill pill with no ring. The default (`true`) keeps the outlined look for backwards compatibility. |
active | boolean | false | Interactive "on" state for a toggle/count badge (`as="button"`): fills the pill with its tone instead of just tinting the border. |
dot | boolean | false | Leading status dot in the badge colour. |
icon | IconName | — | |
removable | boolean | false | |
onremove | (e: MouseEvent) => void | — | |
actionIcon | IconName | — | Trailing action glyph; renders the action button even without `removable`. |
actionLabel | string | — | Accessible name for the action button (defaults to "Remove"). |
onaction | (e: MouseEvent) => void | — | |
removed | boolean | false | Muted, struck-through look for an entry pending removal. |
class | string | '' | |
grow | boolean | false | Fill the free space of a flex row (`flex: 1 1 0`). |
shrink | boolean | true | `false` pins the box (`flex: none`) so a flex row cannot squeeze it. |
block | boolean | false | Full-width block. |
children | Snippet | — |