Badge
A compact label for statuses, categories, or counts. It has a subtle or solid fill (fill-subtle, fill-solid), a status dot with an optional pulse (data-badge-dot, is-pulse), an icon before or after (ts badge-prefix, ts badge-suffix), and it can be a link (<a class="ts badge" href>).
Feedback and status · TaishoDS Core, in plain HTML.
Examples
One working example per case. Each example is the HTML of its preview—copy it as is, and with Core’s CSS and JS loaded, it looks and works the same.
“New” badge
Deployment status: ready
Deployment status: queued, with dot
Deployment status: failed, solid fill
Class reference
Every value of each modifier, with its HTML ready to copy.
Size
Badge height: sm for dense lists, lg to stand out.
Fill
How solid the background is. solid paints the full color; subtle tones it down.
Variant
The status color, by what it communicates: success, warning, info, danger, brand, accent…
Contrast
contrast-low lowers the contrast when the badge plays a supporting role and shouldn’t shout.
Density
Inner spacing. compact tightens the padding; comfortable loosens it.
States
is-pulse adds a pulse for live signals.
Combinations
Size, fill, and color combined.
When to use
- Showing something’s status in one word, like “Active,” “Beta,” or “Expired.”
- Placing a count or a category next to a heading or a row.
- You want it to read at a glance, without being a control.
When not to use
- The user needs to remove it or click it to filter →
tag. - The message needs more than two words →
note. - It’s an action, not a label →
button.
Do
- The text has to state the status. Color alone isn’t enough.
- Use the dot to reinforce a live status, never to replace the label.
Don’t
- Don’t use it as a button. If it needs to be clicked, it’s something else.
- Don’t put sentences in it. A long badge stops being compact.
TaishoDS Core
Doesn’t need JavaScript—it’s markup and CSS.
Purely presentational.
From the CDN, without a build, load taisho.badge.css along with taisho.base.css. That file is all you need.
For how Core works in general, see Behavior.
Accessibility
- The meaning is in the text, not just the color. A status badge should always have a readable label.
- The dot (
ts badge-dot) and the pulse (is-pulse) are decorative. They don’t replace the text label. Withprefers-reduced-motionthe pulse halo stops and the dot remains.
Verification
What was actually tested. Anything that wasn’t tested says so—we’d rather say “not verified” than claim too much.
- axe WCAG 2.2 A + AA in a real browser, in light and dark mode, before every release.
- keyboard Adds no keys of its own—it uses the browser’s native behavior.
- screen reader Not verified with a screen reader. Test it in your own combination of components, not just here, where each one appears alone and on its happy path.