Duolith docs

Badge

A short status word or count, in four tones, soft or solid.

Stability: experimental

Props

PropTypeDefaultMeans
labelstringThe word or number.
tone"neutral" | "primary" | "success" | "danger"neutralIts colour.
solidbooleanfalseA filled badge, for counts that need attention.
iconstringA small icon before the label.

States

StateLooks like
defaultA pill of the tone at 15% on the surface, or filled when solid.

Accessibility

rolenone (text)
nameIts label is read as text.
focusNever 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 />