API and Development
ToggleGroupRoot wraps ToggleGroup.Item children as a mutually exclusive selection (type="single"). ToggleGroupItem renders a button with vertical separators and CoreText labels. Sizes: ToggleGroupSize.Small, Medium, Large (default).
Name | Type | Default | Description |
|---|---|---|---|
|
| — | Additional CSS class name applied to the root container. |
|
|
| Collapses every unselected item down to its icon, animating the selected
item's label open. Items must supply an |
|
| — | Default selected value for uncontrolled usage. |
|
| — | When true, disables all toggle items. |
|
| — | When true, items span the full width of the parent evenly. |
|
| — | Callback fired when the selected toggle changes. |
|
| — | Ref forwarded to the root |
|
|
| Size variant controlling height and padding. |
|
| — | Controlled selected value. |
Interactive examples and edge cases for this component are in Storybook.
| Prop | Default | Description |
|---|---|---|
collapseUnselectedLabels | false | Animates unselected items down to their icons. Every collapsible item must provide icon and aria-label. |
Name | Type | Default | Description |
|---|---|---|---|
|
|
| Stable id for selection. |
|
|
| Disables one option. |
|
|
| Visible label. |
|
| — | Leading icon; required for items that collapse under |
|
| — | Accessible name; required when the label collapses to an icon. |