|
| 1 | +# Button groups |
| 2 | + |
| 3 | +A **button group** visually connects multiple related buttons into a single, unified control. |
| 4 | +It helps users recognize that the buttons belong to the same context or task area. |
| 5 | + |
| 6 | +## Usage --- |
| 7 | + |
| 8 | +Button groups can contain standard buttons that perform **actions**, or **selection** buttons that represent modes or states. |
| 9 | + |
| 10 | +### Action button group |
| 11 | + |
| 12 | +An **action button group** organizes related commands that belong to the same workflow or functional area. |
| 13 | +Each button performs its own action, and several buttons can be used in sequence. |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +An action button group is a simple row of independent buttons with no collapsing or overflow menu. |
| 18 | +Unlike the [content action bar](../buttons-menus/content-actions.md), a unified responsive menu bar treated as one navigable unit, |
| 19 | +each button in a button group receives focus individually when tabbing. |
| 20 | + |
| 21 | +Use it for 2–4 direct, peer-level actions (e.g., Expand/Collapse) |
| 22 | +when distinct focus and a fixed layout are required instead of unified menu behavior. |
| 23 | + |
| 24 | +### Split button |
| 25 | + |
| 26 | +A **split button** combines a primary action with a secondary dropdown of related options. |
| 27 | +It is useful when one action is the default or most common, but additional alternatives are available. |
| 28 | + |
| 29 | +Use it to provide a quick “default” action while still offering variations (e.g., Save / Save as…) |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +### Selection button |
| 34 | + |
| 35 | +A **selection button** is used for switching between views, modes, or states, rather than executing direct actions. |
| 36 | +The group visually connects related choices and communicates a selection state instead of triggering independent commands. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +It supports both single and multi-selection, depending on the context: |
| 41 | + |
| 42 | +- **Single selection:** only one option can be active at a time (radio behavior), |
| 43 | + e.g., switching between different views such as `All`, `Read` and `Unread`. |
| 44 | +- **Multi-selection:** several options can be active simultaneously (checkbox behavior), |
| 45 | + e.g., filtering by `Temperature`, `Pressure`, and `Voltage`. |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +### Best practices |
| 50 | + |
| 51 | +- For binary options, such as `yes/no` or `on/off` use a [switch](../forms-inputs/switch.md) component. |
| 52 | +- If there are more than five options or not enough horizontal space, use |
| 53 | + the [select](../forms-inputs/select.md) component. |
| 54 | +- For multi-select scenarios with unrelated options, prefer the |
| 55 | + [checkbox](../forms-inputs/checkbox.md) component. |
| 56 | +- When switching between distinct content areas, such as sub-pages, use |
| 57 | + [tabs](../layout-navigation/tabs.md) component. |
| 58 | +- Labels should be nouns or noun phrases that succinctly describe |
| 59 | +the action or choice. Do not wrap the text over multiple lines. |
| 60 | + |
| 61 | +## Design --- |
| 62 | + |
| 63 | +### Variants |
| 64 | + |
| 65 | +Button group supports label+icon, label only and icon only. |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +### Styles |
| 70 | + |
| 71 | +The **action button group** and **split button**, inherits the same visual style and interaction states as |
| 72 | +[standard buttons](../buttons-menus/buttons.md). |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +Although different hierarchies (e.g., primary, secondary, tertiary, or danger) can technically be |
| 77 | +combined within the same group, this is not recommended. |
| 78 | +**All items should share the same visual style** to maintain cohesion and clarity. |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +The **selection button** has a dedicated style and is only available in this variant. |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +### Sizes |
| 87 | + |
| 88 | +The button group follows the same sizing system as standard buttons. |
| 89 | +The default size is `32px`, matching the default button height. |
| 90 | +A large size at `40px` is also available for layouts that require increased prominence or touch-friendly targets. |
| 91 | + |
| 92 | +### Responsive behavior |
| 93 | + |
| 94 | +The button group component has by nature a horizontal layout and can't be |
| 95 | +wrapped or stacked. Therefore, it is recommended to keep the number of items |
| 96 | +low to avoid overflowing on smaller screens. |
| 97 | + |
| 98 | +Alternatively,, actions can be collapsed under a menu or replaced with a [select](../forms-inputs/select.md), |
| 99 | +[radio](../forms-inputs/radio.md), or [checkboxes](../forms-inputs/checkbox.md) component, |
| 100 | +depending on the interaction type. |
0 commit comments