Selection
Chip
A small outlined pill that narrows a list, offers a related shortcut or holds a value someone typed: filter, assist and input chips.
In kanso-ui as Chip
Variants and sizes
- Filter:
k-chipwitharia-pressed. Selected is aninkfill, anon-inklabel and acheckbefore it;aria-checked="true"andk-chip--selectedgive the same look. - Assist:
k-chipwith a leading icon and no selected state. - Input:
k-chip k-chip--input, the value followed by ak-chip__removebutton.
States
- Hover and pressed: the state layer at
state-hover(8%) andstate-pressed(12%). - Focus: the 2px
focus-ring. - Selected: the ink fill and the check icon. The check is a shape, so selection does not rest on colour.
- Disabled: there is none; leave out a chip that cannot apply.
Do and don’t
Do
Keep labels to one to three words.
Name each remove button after its value.
Don’t
Use a chip for the main action of a screen.
Mix filter and assist chips in one row.
Colour chips: selected is ink in every product.
What you provide
- Label, and an icon name for assist chips.
- Filter: the selected state, a change handler and the group's name.
- Assist: the press handler.
- Input: the value and a remove handler.