children
React.ReactNode
value
string
onValueChange
(value: string) => void
Each item component needs a value
prop to represent the value of the option. Use value
and onValueChange
props on the root component to control the selected state.
ToggleGroup uses Radix underneath the hood, but unlike Radix, this component can only have one selected value at a time.
View code