Status badge
BetaData displayOpen in the workshop
The state of a campaign, partner or payment, in one word and one color.
.xg-badge · tone --success --warning --error --info (none = neutral) · --live (pulsing dot) · --solid · --nodotExample and markup
Live, from xg-ui.css and xg-ui.js. Switch the brand and mode on the example itself, or for the whole site in the header.
Markup
<div class="xg-row">
<span class="xg-badge xg-badge--success xg-badge--live">Live</span>
<span class="xg-badge xg-badge--success">Active</span>
<span class="xg-badge">Paused</span>
<span class="xg-badge">Draft</span>
<span class="xg-badge">Ended</span>
<span class="xg-badge xg-badge--warning">In review</span>
<span class="xg-badge xg-badge--warning">Limited</span>
<span class="xg-badge xg-badge--error">Blocked</span>
<span class="xg-badge xg-badge--error">Rejected</span>
<span class="xg-badge xg-badge--info">Scheduled</span>
<span class="xg-badge xg-badge--info">Pending</span>
</div>States
Hover, focus and pressed are forced here with .is-hover, .is-focus and .is-active so they can be seen side by side; in a product they come from :hover, :focus-visible and :active.
| State | Tinted | Solid |
|---|---|---|
| Live | Live | Live |
| Paused | Paused | Paused |
| In review | In review | In review |
| Blocked | Blocked | Blocked |
| Scheduled | Scheduled | Scheduled |
Variants
Markup
<div class="xg-row">
<span class="xg-badge xg-badge--solid xg-badge--success">Live</span>
<span class="xg-badge xg-badge--solid">Paused</span>
<span class="xg-badge xg-badge--solid xg-badge--warning">In review</span>
<span class="xg-badge xg-badge--solid xg-badge--error">Blocked</span>
<span class="xg-badge xg-badge--solid xg-badge--info">Scheduled</span>
</div>When to use it
Use it for
the status column of a table, the head of a detail page.
Not for
counts (use a count pill); categories (use Tag).
Rules
- The vocabulary is fixed. Live (success, pulsing) · Active (success) · Paused (neutral) · Draft (neutral) · Ended (neutral) · In review (warning) · Limited (warning) · Blocked (error) · Rejected (error) · Failed (error) · Scheduled (info) · Pending (info).
- One word or two, sentence case. Never invent a new status in a screen; propose it (Contributing).
- Tinted by default; solid only where a status must shout (a banner, a single detail-page header).
- The dot is decoration; the word carries the meaning.
Accessibility
- Text passes 4.5:1 on its tint in every brand and mode (measured on the Accessibility page).
- The live pulse stops under prefers-reduced-motion.
Every color pair this component uses is measured for both brands in light and dark on the Accessibility page.
Related
Also in Data display: Data table, Pagination, KPI card, Tag, Avatar, Progress, Chart, Tooltip, Empty state, Skeleton, Spinner. Used in the patterns Dashboard, Reporting table, Forms and overlays.
Status Beta: usable; class names may still change in a minor release, with a note (see Releasing).