Import
Basic Usage
Key Features
- Manages state for multiple toggle buttons
- Single or multiple selection modes
- Controlled and uncontrolled modes
- Keyboard navigation (arrow keys)
- Horizontal and vertical orientation
- Accessible with proper ARIA attributes
Key Props
value
Type:readonly string[]
The open state of the toggle group represented by an array of the values of all pressed toggle buttons. Use with onValueChange for controlled mode.
defaultValue
Type:readonly string[]
The initial state of the toggle group. Use for uncontrolled mode.
onValueChange
Type:(groupValue: string[], eventDetails: ChangeEventDetails) => void
Callback fired when the pressed states of the toggle group changes.
multiple
Type:boolean
Default: false
When false, only one item in the group can be pressed. When true, multiple items can be pressed.
disabled
Type:boolean
Default: false
Whether the toggle group should ignore user interaction.
orientation
Type:'horizontal' | 'vertical'
Default: 'horizontal'
The orientation of the toggle group.
loopFocus
Type:boolean
Default: true
Whether to loop keyboard focus back to the first item when the end is reached.
Styling
- Tab Title
- Tab Title