COMPONENTS
Badges
Passive status labels, counts and categories. One badge class identifies the component; theme, accent, size, shape, density, depth, borders and material follow the parent. No attributes are required on individual badges.
Usage
Markup: .badge
Behaviour: Passive labels; no automatic announcements or interaction.
- Use a span for a plain label. A badge has no automatic alert/status role, focusability or live announcement. For changing information, choose a live region on its meaningful containing element only when announcements are needed.
- Write the status in visible text. Colour alone must not carry its meaning. Counts need context, for example “3 unread messages.” Use native links and buttons for actions; a badge itself is a passive label.
- data-variant (primary, success, warning, danger, neutral) and data-appearance (tinted, solid, outline) configure badges on html, any parent, or an optional local exception. Unsupported values keep the nearest valid parent setting. data-fill retains its existing gradient/solid meaning; decorative data-edge does not apply to badges.
Component API and styling module · Inherited appearance settings
One class, no attributes
The default badge is tinted and uses the inherited accent. Use ordinary text around a count to explain it.
Product update New
Unread messages 3
Configure a parent once
Both badges inherit the parent. The same settings can be placed on html for the whole site.
Featured New
Status colours from parents
A status on a parent applies to all badges inside it. Each label states its meaning in text.
Tinted, solid and outline
Appearance is separate from status and from the shared gradient setting.
Shared size and shape
Size and shape are inherited. Labels can wrap instead of widening a narrow page.
Square
Optional local exceptions
The parent remains the default. Override only the label or subtree that needs to differ; plain buttons keep their existing API.
Approved
Pending review
Paid
Inherited glass with a solid exception
Load the optional glass stylesheet. Badges inherit material; solid stops it locally. Unsupported blur falls back to the normal opaque badge.
Glass label
Solid exception
A count inside a sized action
The badge remains relative to the action text while preserving shared size and an optional local badge override. The button label supplies count context.