Badge
Atom
Two families on one Badge component, picked by boolean props. The metadata badge labels a schema, role, or tag: with no tone it is the accent's soft pill, and the tones give default the solid call-to-action pill, secondary the quiet surface pill, outline a hairline pill and destructive the soft red pill; add mono for token names. A status tone (success, warning, error, info, neutral) paints the pill in that tone's wash and ink and leads it with a dot. The status badge (status) has no pill: a dot in the tone's color, ringed in its wash, beside a muted label, for live state like active, pending, or failed.
Playground
Every control sets a real prop of BadgeProps. The JSX below updates as you go.
Web
iOS
Android
JSX · BadgeProps
Variants
9 examples from src/atoms/badge/badge.md, each rendered live from its own JSX.
Sizes
Anatomy
1
Container
2
Status dot
3
Label
Dimmed parts appear only in some states or variants.
Props
46 props on BadgeProps, grouped as they are declared in source. Required props are marked *.
Accessibility and keyboard
Keyboard
Not focusable. It has no interaction of its own and takes the semantics of what it wraps.
Semantics
Roles
group
image
img
link
ARIA on web
aria-hidden
aria-label
From the docs
Lay out a series of badges with BadgeGroup, a wrapping row that owns the gap (tight 4 / compact 6 / snug 8 / cozy 12, default compact, the hand-off's 6; the largest gap passed wins: cozy > snug > compact > tight) and centers its badges, so a call site never hand-rolls a flex row around them. Give it an accessibilityLabel (say, "Rachel Chen's roles") and it is announced as a named group that keeps its badges' text; without one it is a plain row.
signal is the original standalone 10px status marker. It uses the existing status-tone precedence and announces its supplied status label.
Platform skins
The playground's props on each platform: same tree, native shapes, type and touch sizes.
Usage
The tone colors come from statusColors, the helper every toned surface in the kit reads, so a warning badge and a warning alert are the same state, and every ink is the solved text role that keeps 4.5:1 on its wash.
contrast is the most prominent neutral: the scheme's ink (foreground) as the fill under the page colour as the label (under glass, the ink at the dense alpha, as the Tooltip bubble's). dashed is the placeholder outline: no fill inside a dashed field-border edge, the label in the second ink.
If more than one tone is passed, Badge resolves the highest-precedence one: default > contrast > destructive > secondary > outline > dashed for metadata (the accent's soft pill when none is passed), and success > error > warning > info > neutral for status (neutral when none is passed). The metadata tones win over a status tone's colors; the status tone's dot stays.
Tokens
Read from the playground render. Values follow the scheme and the ion hue.
--fd
--ft
--ion-soft
--ion-tx