Overview
Badge styling is concentrated in one compact surface with size, appearance, and semantic variant variables.
Public CSS Variables
Active
Beta
| Variable | Value | Affects |
|---|---|---|
Height and minimum width.Badge | No visible change in this state | |
Text size.Badge | No visible change in this state | |
Background color.Badge | No visible change in this state | |
Outline color.Badge | No visible change in this state | |
Text color.Badge | No visible change in this state | |
Chroma added to the accent color in the tinted background.Badge | No visible change in this state |
Part-Level Variables
Badge: owns the entire badge surface.
State And Variant Interaction
sizechanges height and font size.appearancechanges fill, surface, outline, or ghost treatment.variantchanges the semantic color family.
Examples
.compactBadge {
--badge-size: 18px;
}.brandBadge {
--badge-border-radius-ratio: 0.5;
}Do Not Override
- Do not stretch the badge into a paragraph container.
- Do not rely on color alone to carry meaning.
- Do not invent custom variants without matching styles.