Badge
A short status label in six tones. The word carries the meaning, and the color backs it up.
Tones
Draft
Neutral
Plain status with no judgment.
New
Accent
Draws the eye. Use one at a time.
In review
Info
Something is in progress.
Paid
Success
Done and good.
Due soon
Warning
Needs attention before long.
Overdue
Error
Needs attention now.
In use
- Invoice 1041 Harbor BakeryPaid
- Invoice 1042 Linden YogaDue soon
- Invoice 1043 Northwind BooksOverdue
- Invoice 1044 Maple DentalIn review
Made-up businesses, for the demo.
Code
Plain HTML for any site, or React. Both use the same styles, so the badge looks the same wherever it lands.
ReadyAny website, Shopify, WordPress, Square, plain hosting
<link rel="stylesheet" href="tokens.css">
<link rel="stylesheet" href="base.css">
<!-- Badge: a short label. The word carries the meaning, never color alone. -->
<span class="prism-badge">Draft</span>
<span class="prism-badge prism-badge--accent">New</span>
<span class="prism-badge prism-badge--info">In review</span>
<span class="prism-badge prism-badge--success">Paid</span>
<span class="prism-badge prism-badge--warning">Due soon</span>
<span class="prism-badge prism-badge--error">Overdue</span>Accessibility
- The word carries the meaning. Color only backs it up, so it works for color blindness and in grayscale.
- Status colors pass 4.5 to 1 against the page in every Prism theme and brand.
- Keep it short, one or two words. Longer messages belong in an alert.
- A badge is text, not a button. If it does something, use a button or a link.
- In Windows high contrast mode, every badge keeps its edge.