Description
- A toggle button turns something on and off, or triggers a related action.
- A toggle button is mostly used in a group.
- Exclusive selection toggle buttons let a user select only 1 toggle button in a group.
- Multiple selection toggle buttons let a user select multiple toggle buttons in a group.
Anatomy
This example shows an exclusive group of 3 toggle buttons.
Anatomy
Size
- Available in S size (text only, no icons), M size and L size.
- Choose the most suitable size based on context, space, and screen size.
- Button heights are fixed according to the size you use.
- Button widths should fit to content or extend to the full width of a container.
States
Component-specific states
Active disabled
Variations
Toggle button group
Toggle buttons are usually used in groups of at least 2 buttons.
Exclusive - icon only
Multiple - icon only
Exclusive - label only
Multiple - label only
Exclusive - label with icon
Multiple - label with icon
Toggle button single
- Use a single toggle button to turn something on and off. For example, bold text in a rich text editor toolbar.
- Add an icon to draw attention to the button and explain the action.
Label only
Label and left icon
Label and right icon
Icon only
Color mode
Light
Dark
Dos and don'ts
Do
Do
Do
Do
Do
Do
Do
Do