Chip

Pick options from a row of pills, one or several at a time.

General

A Chip alone works as a checkbox. Control it with checked and onChange, or let it keep its own state.

Multiple

Chip.Group with multiple lets the user check several chips. onChange receives the values of the checked ones.

Single

Without multiple, checking a chip unchecks the other, the way a radio group does.

Filtering a list

Use the checked values to filter what is shown. Here the list narrows to the topics you picked.

APIs

Chip.Props

AttributeDescriptionTypeAccepted valuesDefault
valuevalue the chip adds to or takes from its Chip.Groupstring--
checkedchecked state, to control the chipboolean--
initialCheckedchecked state at the startboolean-false
onChangecalled with the new state when the chip is alone(checked: boolean) => void--
typecolor of a checked chip'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info'-primary
disabledblock the chipboolean-false
...native props of the inputInputHTMLAttributes--

Chip.Group.Props

AttributeDescriptionTypeAccepted valuesDefault
valuevalues of the checked chips, to control itstring[]--
initialValuevalues checked at the startstring[]-[]
onChangecalled with the values of the checked chips(value: string[]) => void--
multipleallow several checked chipsboolean-false
disabledblock every chip of the groupboolean-false
...native propsHTMLAttributes--
Edit this page on GitHub