Badge
A short status word or count, in four tones, soft or solid.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
label | string | The word or number. | |
tone | "neutral" | "primary" | "success" | "danger" | neutral | Its colour. |
solid | boolean | false | A filled badge, for counts that need attention. |
icon | string | A small icon before the label. |
States
| State | Looks like |
|---|---|
default | A pill of the tone at 15% on the surface, or filled when solid. |
Accessibility
| role | none (text) |
| name | Its label is read as text. |
| focus | Never focused. |
Theme tokens
color.raised color.muted color.primary color.success color.danger color.surface space.1 space.2 radius.full text.caption
Example
<Badge label="3" tone="danger" solid />