Badge

Two families on one Badge component, picked by boolean props, both Dark Factory's pill. The metadata badge labels a schema, role, or tag (tones: secondary, the quiet surface pill and the default; default, the solid call-to-action pill; outline, a hairline pill; destructive, the soft red pill; add mono for token names). The status badge (status) is Dark Factory's live-state pill for state like active, pending, or failed: a quiet pill whose leading dot carries the tone (success, warning, error, info, neutral) beside a label in the foreground.
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.
If more than one tone is passed, Badge resolves the highest-precedence one: default > destructive > secondary > outline for metadata (secondary when none is passed), and success > error > warning > info > neutral for status (neutral when none is passed).
Lay out a series of badges with BadgeGroup, a wrapping row that owns the gap (tight / snug / cozy, default snug; the largest gap passed wins: cozy > snug > 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.
admin
iOS
admin
Android
admin
Web
tsx
<Badge>admin</Badge>

Props

Badge

Prop
Description
children
ReactNode
—
status
boolean
Family: metadata badge (default) vs. status badge (with a dot).
default
boolean
Metadata tone (pick one; default is the `secondary` surface pill).
secondary
boolean
Metadata tone (pick one; default is the `secondary` surface pill).
outline
boolean
Metadata tone (pick one; default is the `secondary` surface pill).
destructive
boolean
Metadata tone (pick one; default is the `secondary` surface pill).
mono
boolean
Metadata modifier: monospace face for tokens, scopes, event names.
success
boolean
Status tone (pick one; only applies when `status`).
warning
boolean
Status tone (pick one; only applies when `status`).
error
boolean
Status tone (pick one; only applies when `status`).
info
boolean
Status tone (pick one; only applies when `status`).
neutral
boolean
Status tone (pick one; only applies when `status`).
accessibilityLabel
string
Accessible name for the badge. Most useful for the status family: the bare-dot status form (`<Badge status error />` with no children) is otherwise color-only and silent to screen readers. When omitted on a childless status badge, the status tone word (e.g. "error") is announced as a fallback. Mirrors the Spinner/Progress `accessibilityLabel` contract.
testID
string
E2E hook forwarded to the root element.
style
LayoutStyle
Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds.

BadgeGroup

Prop
Description
children
ReactNode
The Badge elements to lay out in a wrapping row.
tight
boolean
Inter-badge gap (pick one; default `snug`). Precedence: cozy > snug > tight.
snug
boolean
Inter-badge gap (pick one; default `snug`). Precedence: cozy > snug > tight.
cozy
boolean
Inter-badge gap (pick one; default `snug`). Precedence: cozy > snug > tight.
accessibilityLabel
string
Accessible name for the whole group (e.g. "Rachel Chen's roles").
testID
string
E2E hook forwarded to the root element.
style
LayoutStyle
Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds.

Do & Don’t

Grouping

Don’t
employee
engineering
remote
Hand-rolling a flex row for a badge series re-invents the gap and wrap and drifts from the kit's spacing scale.
Do
employee
engineering
remote
Reach for BadgeGroup to lay out a series of badges; it owns the wrap, the gap, and the vertical centering.

Metadata badge

Don’t
employee
engineering
remote
active
Borrowing status colors for plain metadata reads as severity that isn't there; a red tag looks like an error.
Do
employee
engineering
remote
active
Neutral tags for metadata; reserve color and the status-badge dot for live state.

Status badge

Don’t
A bare colored dot isn't a label and fails for color-blind users.
Do
Failed
Always pair the dot with a word: active, pending, failed.

Identity row

Don’t
Rachel Chen
active
Verified
employee
engineering
remote
admin
A wall of badges after a name buries the one that matters.
Do
Rachel Chen
active
employee
Show only the one or two badges relevant to this view.

Token / code badge

Don’t
authorization_code
refresh_token
client_credentials
Proportional type makes identifiers hard to scan and compare.
Do
authorization_code
refresh_token
client_credentials
Use the mono variant for tokens, scopes, and event names.

Default variant

Don’t
employee
engineering
remote
admin
The solid call-to-action fill is the loudest badge; using it for every tag makes the whole row shout and nothing leads.
Do
admin
engineering
remote
Reserve the default fill for the single tag you want noticed first; keep the rest secondary.

Secondary variant

Don’t
active
pending
failed
A muted gray pill reads as static metadata, so live state shown as a secondary badge looks inert and goes unnoticed.
Do
employee
engineering
active
Keep secondary for static metadata (role, team) and switch to the status-badge for anything live.

Outline variant

Don’t
draft
internal
The thin border is the whole badge; on a colored or busy surface it disappears and the label floats unboxed.
Do
draft
internal
Use outline on a plain surface where the quiet border has contrast, for low-priority secondary tags.

Destructive variant

Don’t
marketing
finance
legal
Solid red signals error or danger, so using it to color-code neutral categories raises a false alarm.
Do
Revoked
Banned
marketing
Reserve destructive for genuinely destructive or error semantics like revoked or banned.