ToggleGroup is a component that allows you to group multiple toggles together. Useful for when you want to allow users to select multiple options. For example, a user can select multiple filters for a search.
Root component for the ToggleGroup component.
| Prop | Type | Default |
|---|---|---|
type | enum | single |
className | string | '' |
loop | boolean | true |
orientation | enum | horizontal |
value | any | -- |
defaultValue | any | [] |
onValueChange | function | -- |
color | string | null |
customRootClass | string | '' |
disabled | boolean | false |
dir | enum | ltr |
rovingFocus | boolean | true |
asChild | boolean | false |
children | React.ReactNode | null |
Item component for the ToggleGroup component.
| Prop | Type | Default |
|---|---|---|
children | React.ReactNode | null |
value | any | null |
iconOnly | boolean | false |
className | string | '' |
disabled | boolean | false |
asChild | boolean | false |