Toggle button
ToggleButton allows users to switch between two states, typically representing an on/off or active/inactive status. The corresponding action takes effect immediately. With ToggleButtonGroup, users can make a single selection from a set of related commands, with only one option selected at a time.
Also known as: Button group, Toggle button group, Toggle group, Segmented control
Note: This tab list includes overflow; tab positions may be inaccurate or change when a tab is selected
- When a toggle button has both an icon and text, use
aria-hiddenon the icon so that screen readers don't announce its text. - When a toggle button has an icon only and no text, pass an
aria-labelto the button that describes its purpose.
| Key | Function |
|---|---|
| Tab |
|
| Space / Enter |
|
| Shift + Tab |
|
| Right arrow / Down arrow |
|
| Left arrow / Up arrow |
|
- When a toggle button has both an icon and text, use
aria-hiddenon the icon so that screen readers don't announce its text. - When a toggle button has an icon only and no text, pass an
aria-labelto the button that describes its purpose.
| Key | Function |
|---|---|
| Tab |
|
| Space / Enter |
|
| Shift + Tab |
|
| Right arrow / Down arrow |
|
| Left arrow / Up arrow |
|
- When a toggle button has both an icon and text, use
aria-hiddenon the icon so that screen readers don't announce its text. - When a toggle button has an icon only and no text, pass an
aria-labelto the button that describes its purpose.
| Key | Function |
|---|---|
| Tab |
|
| Space / Enter |
|
| Shift + Tab |
|
| Right arrow / Down arrow |
|
| Left arrow / Up arrow |
|