Chip
Pick one or multiple values with inline controls
Source
LLM docs
Docs
Package
Usage
Controlled
Read only
Set readOnly prop to prevent the chip from being changed by the user. The chip
still reflects checked prop updates, but clicking it or pressing Space does not
change its state and does not call onChange:
Change checked icon
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
The Chip.Group component manages the state of child Chip components.
Set the multiple prop to allow multiple chips to be selected at a time:
Controlled Chip.Group
Deselect radio chip
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.