Badge
A short label in a pill: a number, a status, a word.
import { Badge } from "@dede-style/ui/badge", then <Badge>1</Badge>. It is plain text, read with whatever it sits beside: no role, no focus, nothing to press.
| Prop | Description | Default | Control |
|---|---|---|---|
| children | the label, required. One character is a circle; more is a pill | ||
| variant | how much it stands out: quiet (default) sits back, strong is a solid fillquietstrong | quiet | |
| tone | what it means: neutral (default), or a status colourneutralinfosuccesswarningerror | neutral |
|
| border | draw an edge in the tone's border colour. It takes no room, so the badge stays the same size. Quiet status badges on a light page need it to read as a pill. Strong has no border; its fill is the edge | false |
Tokens
What a theme can move, where the props above are what an instance can move.
Badge has none, and that is a decision rather than an omission. Every value it renders already resolves through a foundation token or a role, so a theme moves it by moving those. A component token earns its place only when a theme needs to change one component without changing the role beneath it.
These are public and overridable — there is no private custom property, because anything on :root is reachable by any stylesheet. What replaces privacy is a stability contract: primitives may move, roles are the guarantee, and these are the per-component escape from both.