Badges and status
On this page
Badges label a record's state (Active, Expiring, Suspended). Status indicators show whether something is working right now (Online, Offline, Live). Avatars stand in for people, and keyboard keys show shortcuts.
Badges


Figure 1: Neutral, success, warning, danger, info and purple badges
<span class="ph-badge">Draft</span>
<span class="ph-badge ph-badge--success">Active</span>
<span class="ph-badge ph-badge--warning">Expiring</span>
<span class="ph-badge ph-badge--danger">Suspended</span>
<span class="ph-badge ph-badge--info">New</span>
<span class="ph-badge ph-badge--purple">Beta</span>
| Class | Use for |
|---|---|
.ph-badge | Neutral states and counts: Draft, a number in a tab |
.ph-badge--success | Good states: Active, Paid, Connected |
.ph-badge--warning | Needs attention soon: Expiring, Paused, Retrying |
.ph-badge--danger | Something is wrong: Suspended, Failed, Denied |
.ph-badge--info | Neutral news: New, Updated |
.ph-badge--purple | Special categories: Beta, VIP |
Status


Figure 2: Status indicators, including the pulsing live status
<span class="ph-status ph-status--success">Online</span>
<span class="ph-status ph-status--live">Live</span>
| Class | Dot | Use for |
|---|---|---|
.ph-status | Grey | Unknown or not reporting |
.ph-status--success | Green | Online, healthy |
.ph-status--warning | Orange | Degraded, slow |
.ph-status--danger | Red | Offline, failed |
.ph-status--info | Blue | Updating, syncing |
.ph-status--live | Green, pulsing | A live feed that is updating now. The pulse stops when the viewer asks for reduced motion. |
Avatars and keyboard keys


Figure 3: Avatar sizes, an avatar group and keyboard keys
<span class="ph-avatar" aria-hidden="true">NP</span>
<div class="ph-avatar-group" aria-label="4 team members">
<span class="ph-avatar" aria-hidden="true">CN</span>
<span class="ph-avatar" aria-hidden="true">MK</span>
<span class="ph-avatar" aria-hidden="true">+2</span>
</div>
<p>Press <kbd>Ctrl</kbd> + <kbd>K</kbd> to search.</p>
| Class | Size |
|---|---|
.ph-avatar--sm | 24px |
.ph-avatar | 32px |
.ph-avatar--lg | 48px |
.ph-avatar-group | Overlaps avatars, with a ring around each |
kbd or .ph-kbd | A key cap |
Avatars show initials. Hide them from screen readers (aria-hidden="true") when the person's name
is next to them, and label a group with a count.
React
import { StatusChip } from 'ph-app-kit-react';
<StatusChip tone="success">Active</StatusChip> // tone: success | danger | warning | info | neutral
Guidelines
- Colour is never the only signal: the badge or status always has a word.
- Use one word or two. Badges aren't sentences.
- Pick the tone by what the person should do: nothing (success), keep an eye on it (warning), act now (danger).
- Use badges for a record's state and status dots for whether something is connected or running.