01
When to use
Use it for- Filters over a list: Unread, Mentions, Starred.
- One or several values from a short set, chosen at once: a status, departments.
- A choice someone made, shown so it can be taken away: Status: Active ×.
02
Anatomy
- 1
chip-group<div>ChipGroup: role="group" of checkboxes with multiple, a radiogroup for one value; named by label. - 2
chip<span>A chip, role="checkbox"; chosen, the selected tint and a 2px Ember edge. - 3
chip-check<span>The check before the label, so the choice never rests on colour. - 4
chip-label<span>The label; a long one wraps. - 5
chip-icon<svg>A 16px sharp icon, in the check's place. - 6
icon-button<button>"Remove Team: Finance": a small neutral IconButton.
03
Do and don't
A status is a BadgeDoA record's status, read only: a Badge.Don'tA chip for a status no one can change: it reads as a control. One value: a groupDoOne of a set: a ChipGroup, its chips radios with one Tab stop.Don'tLoose chips for one choice: each a checkbox, so two can be on. 04
Sizes
Each height follows the region's density.
05
Content
- One or two words: "Unread", or a filter and its value, "Status: Active".
- Name the group: label says what's being chosen, "Status". It isn't shown, so put a visible heading beside it where the page needs one.
- A label that isn't plain text needs removeLabel, so its remove button has a name.
Next — ChipAPI