ToggleGroup
Overview
A set of two-state buttons that can be toggled on or off.
Properties
Properties | Description |
---|---|
type | Determines whether a single or multiple items can be pressed at a time. |
value | The controlled value of the pressed item when type is "single". Must be used in conjunction with onValueChange. |
defaultValue | The value of the item to show as pressed when initially rendered and type is "single". Use when you do not need to control the state of the items. |
onValueChange | Event handler called when the pressed state of an item changes and type is "single". |
disabled | When true, prevents the user from interacting with the toggle group and all its items. |
rovingFocus | When false, navigating through the items using arrow keys will be disabled. |
orientation | The orientation of the component, which determines how focus moves: horizontal for left/right arrows and vertical for up/down arrows. |
dir | The reading direction of the toggle group. If omitted, inherits globally from DirectionProvider or assumes LTR (left-to-right) reading mode. |
loop | When true and rovingFocus is true, keyboard navigation will loop from last item to first, and vice versa. |
Updated 3 months ago