Badge
The status of a record: approved, under review, overdue, draft. It was born for the "status" column of a table, which is where it always shows up, but it doesn't depend on it: it works in a card, in a list and next to a heading. Classes only.
Examples
The tone carries the meaning; the weight stays with the text of the row.
In a table
The status column, read at a glance in a long list.
| Contract | Status |
|---|---|
| Corner Bakery | Paid |
| Two Wheels Garage | Under review |
| Wellness Clinic | Overdue |
| Aurora Studio | Draft |
No dot
is-plain, for what isn't a status: version, count, category.
With an icon
The icon takes the place of the dot: use it with is-plain. With stroke="currentColor" it picks up the tone color on its own, and aria-hidden="true" lets screen readers read only the text.
How to use
<span class="tuc-badge is-success">Approved</span>
<span class="tuc-badge is-warning">Under review</span>
<span class="tuc-badge is-danger">Overdue</span>
<span class="tuc-badge is-info">New</span>
<span class="tuc-badge">Draft</span>
<span class="tuc-badge is-plain">12 attachments</span>In Django
The tone is a decision of the model, not of the template: that way it is the same in the list, in the detail page and in the email.
class Contract(models.Model):
status = models.CharField(max_length=20, choices=Status.choices)
@property
def status_tone(self):
return {"paid": "success", "review": "warning", "overdue": "danger"}.get(self.status, "")<span class="tuc-badge {% if contract.status_tone %}is-{{ contract.status_tone }}{% endif %}">
{{ contract.get_status_display }}
</span>Why not filled
Soft background with strong text. In a list of twenty rows, twenty solid badges compete with the content and the table turns into a traffic light.
The dot repeats the status without relying on background color alone — together with the text, it helps people who can't tell the colors apart, and it reads better on a small screen. It is a pseudo-element, so the screen reader reads only the text, and it is the text that has to state the status: "Overdue", not an empty red badge.
The color is the same as the toast and the alert
The tones read --tuc-success, --tuc-warning, --tuc-danger, --tuc-info and their -soft versions, and never --tuc-accent. The brand can be any color; the meaning of "overdue" can't change along with it.
Classes
| Class | What for |
|---|---|
.tuc-badge | The badge. With no tone, neutral, with a border |
is-success | It worked: approved, paid, active |
is-warning | Needs attention: under review, pending |
is-danger | It went wrong: overdue, declined, blocked |
is-info | Information: new, scheduled |
is-plain | Removes the dot |