Chip
Pick one or multiple values with inline controls
Source
Docs
Package
Usage
Controlled
Change checked icon
Icon and section
Chip can have both icon and left/right sections. This is useful when you want to add an icon to the chip and also have a left/right section.
States
Chip with tooltip
To use Chip with Tooltip and other similar components, set refProp="rootRef"
on the Tooltip component:
Add props to the root element
All props passed to the component are forwarded to the input element. If you need to add props to the root element, use wrapperProps. In the following example:
data-testid="wrapper"is added to the root elementdata-testid="input"is added to the input element
Chip.Group
Chip.Group component manages state of child Chip components,
set multiple prop to allow multiple chips to be selected at a time:
Controlled Chip.Group
Deselect radio chip
Filter
Accessibility
Chip and Chip.Group components are accessible by default – they are built with native radio/checkbox inputs,
all keyboard events work the same as with native controls.