Chips
Assist, suggestion, filter and input chips for compact actions and entries, in a chip set.
import { AssistChip, SuggestionChip, FilterChip, InputChip, ChipSet } from '@windmorph/react';Purpose
Chips are compact elements for a secondary action or a small piece of information. There are four types: AssistChip for a smart action, SuggestionChip for a generated option, FilterChip for a toggleable filter, and InputChip for an entry the user added.
Chips appear in a set: ChipSet lays them out 8px apart, wrapping (rows 16px apart, so each chip keeps its 48px touch target) or in one row that scrolls, makes the set one Tab stop with arrow keys between chips, and can share a single or multiple selection between filter chips. Flat chips carry a 1px outline (outline="strong" for 3:1 contrast); elevated swaps it for a tonal surface at level 1, for chips over images.
Do and don't
When not to use
For a primary action use a Button; for picking one of a fixed set in a form use a Radio group.
See also
- Chips on m3.material.io: Material's own guidelines, with anatomy and specs.
- Button: Five variants and five sizes for text actions, with a toggle form and a press morph.
- Text field: Filled or outlined text input with a floating label, icons, affixes, counter, error icon and a text area.