Chips are compact elements that allow users to enter information, select a choice, filter content, or trigger an action.
Choice chips are a variant of chips which allow single selection from a set of options.
import Material.Chip.Choice as ChoiceChip
type Msg
= ChipClicked String
main =
ChoiceChip.set []
[ ChoiceChip.chip
(ChoiceChip.config
|> ChoiceChip.setSelected True
|> ChoiceChip.setOnClick (ChipClicked "One")
)
"Chip One"
, ChoiceChip.chip
(ChoiceChip.config
|> ChoiceChip.setOnClick (ChipClicked "Two")
)
"Chip Two"
]Specify a message when the user clicks on a chip
Specify whether a chip is selected
Specify additional attributes
Choice chip type
Configuration of a choice chip