Components, Status
Badge
A static label for places where there is no room for a sentence.
defaultDraft
Recommended
Info
Connected
Warning
Needs attention
Failed
squareMCP
Beta
Pro
count3
12
99+
as a sentenceRia is waiting for your answerIt failed. The model took too long to respond.
The badge is a static label that cannot be pressed. Color surfaces are kept to a minimum, and status is shown as one color dot on a neutral surface.
When to use
If you can say it in a sentence, don’t use a badge. “Ria is waiting for your answer” is a sentence, and it reads better than a “Waiting” badge. Use a badge where there is no room for a sentence, such as a table cell or the space next to a title.
| tone | Appearance |
|---|---|
neutral |
muted surface with secondary text |
info, success, warning |
muted surface + color dot + foreground text |
danger, attention |
Soft color surface with text in the same color. Only these two keep a color surface, because they have to draw the eye |
- There is no
primarytone. Useneutral. dotputs a 6px color dot before the label. It is on by default forinfo,successandwarning.shapeispillorsquare.sizeismdorcount.
Placement
danger and attention are translucent surfaces, so place them only on card, popover or background. Inside a row whose hover surface is accent, use only neutral and dot badges.
Markup
<span class="Badge_badge Badge_badge--neutral Badge_badge--md Badge_badge--pill">Draft</span>
<span class="Badge_badge Badge_badge--success Badge_badge--md Badge_badge--pill"><i class="Badge_dot Badge_dot--success" aria-hidden="true"></i>Connected</span>
<span class="Badge_badge Badge_badge--danger Badge_badge--md Badge_badge--pill">Failed</span>
Don’t
- Don’t convey meaning with color alone. Put a word next to the dot.
- Don’t use a badge for something that has to be pressed.
- Don’t use
attentionfor danger or errors. That isdanger.