Badge
A badge is a small label that shows the status of something, like Overdue, Failed, or Success
Overview
Use a badge to give people a quick status at a glance. A badge is static. It is for reading only, and people can't tap it.
There are 3 types (default, destructive, success) and 3 sizes (small, medium, large). That makes 9 variants. The left and right icons are properties, not variants.
There are only three colors for now, on purpose, because of the design system's philosophy. Other badge colors are not available.

Anatomy
Label: the text that says what the status is.
Left icon (optional): an icon before the label.
Right icon (optional): an icon after the label.

Do and Don't
Do
Use a short label that says the status clearly, like Overdue.
Use the type that matches the meaning of the status.
Use the same size for badges in the same list or table.
Don't
Don't make a badge tappable. If something needs to be tapped, use a button.
Don't use a badge for an action.
Don't rely on color alone. Every badge needs a clear text label.
Don't use a badge for long text. The label stays on one line.
Types
Default
A neutral badge, with no good or bad meaning.
When to use: for neutral information or a status that isn't good or bad, like a category or a state.
When not to use: when the status is negative or positive. Use destructive or success.

Destructive
A badge in the error colors, for a negative status.
When to use: for negative statuses, such as Overdue or Failed.
When not to use: for neutral or positive information. Don't use red only to get attention.
It needs a clear text label. The red color alone is not enough.

Success
A green badge, for a positive status.
When to use: for positive statuses, such as Success or Completed.
When not to use: for neutral information, or when the result isn't final yet.
It needs a clear text label. The green color alone is not enough.

Sizes
The badge comes in small, medium, and large.
Small: dense lists and tables.

Medium: general use.

Large: when the status needs more presence, like in a header or a detail page.

Keep the same size for badges that sit next to each other.
Icons
A badge can have a left icon, a right icon, or both. They can be used together.
When to use: when an icon helps people understand the status faster, like a check mark for success or a warning sign for a problem.
When not to use: as decoration. If the icon adds nothing, leave it out.
Rules and behaviors
A badge is static. It isn't tappable and has no hover or focus state.
Destructive uses the error colors and is for negative statuses, such as Overdue or Failed.
Left and right icons can be used together.
The label stays on one line and doesn't wrap.
Best practice
Keep the label to one or two words.
Choose an icon that matches the meaning of the type, so the icon and the label agree.
Don't put many badges next to each other. If everything has a badge, nothing stands out.
Accessibility
Don't rely on color alone. Every badge needs a clear text label, including destructive and success.
Icons are extra. The label should say the same thing without them.
A badge isn't focusable, so it can't be reached with the keyboard.
