Tag
A short label in a chip: a status, a category or a person. Specification: docs/components/tag.md
Emphasis × size
data-emphasis high, medium and low, then without it, at each data-size.
Label
Label
Label
Label
Label
Label
Label
Label
Label
Label
Label
Label
Label
Label
Label
Label
Every size
xs to 2xl. Canon has three tag sizes: xs shows as sm, and xl and 2xl as lg.
xs
sm
md
lg
xl
2xl
Meaning: data-intent
Use data-intent when the color means something: a status. Statuses can look different from categories (here, rounder and in capitals), so the two are never confused. High, medium and low emphasis, then with a dot.
| info | Beta | Beta | Beta | Beta |
| success | Approved | Approved | Approved | Approved |
| warning | Pending | Pending | Pending | Pending |
| danger | Overdue | Overdue | Overdue | Overdue |
Identity: data-seed
Use data-seed when the color only tells tags apart: categories, labels, people. Pass a stable number (an id); it always picks the same color, the same one an avatar with that seed gets. High, medium and low emphasis.
| No seed | Label | Label | Label |
| 0 (blue) | Label | Label | Label |
| 1 (sky) | Label | Label | Label |
| 2 (cyan) | Label | Label | Label |
| 3 (teal) | Label | Label | Label |
| 4 (emerald) | Label | Label | Label |
| 5 (green) | Label | Label | Label |
| 6 (lime) | Label | Label | Label |
| 7 (yellow) | Label | Label | Label |
| 8 (amber) | Label | Label | Label |
| 9 (orange) | Label | Label | Label |
| 10 (red) | Label | Label | Label |
| 11 (rose) | Label | Label | Label |
| 12 (pink) | Label | Label | Label |
| 13 (fuchsia) | Label | Label | Label |
| 14 (purple) | Label | Label | Label |
| 15 (violet) | Label | Label | Label |
| 16 (indigo) | Label | Label | Label |
Same seed, avatar and tag
GH
Grace Hopper
AT
Alan Turing
Not an integer
Seeds are integers. Anything else, like data-seed="abc", gives the neutral color.
Label
Label
Label
In context
A list of tags
Several tags are a <ul>, one per <li>.
- Accessibility
- CSS
- Design systems
- Forms
In running text
The request is Pending until a reviewer from Design approves it.
Larger text, larger tags: Approved by
ALAda Lovelace
On other surfaces
Neutral tags take their colors from the text around them, so they stay visible on gray and dark panels.
Label
Label
Label
Label
Search⌘K
Search⌘K
Label
Label
Label
Search⌘K
Search⌘K
Label
Edge cases
Right-to-left
In right-to-left text the avatar and leading icon move to the right; the key still reads left to right.
AL
Label
⌘K
تمت الموافقة
قيد الانتظار
Long labels in a narrow container
When space runs out the label is cut short with an ellipsis; icons, dot, avatar and key stay whole.
An exceptionally long category name
Overdue since last Tuesday afternoon
Open the command palette⇧⌘P
ALAda Augusta King, Countess of Lovelace
Rows that wrap
- One
- Two
- Three
- Four
- Five
- Six
- Seven