My learning 0 of 20 lessons complete
Start lesson 1 →
Back to compare picker

Button group vs Segmented control vs Menu button vs Confirmation dialog

Use a button group for a small visible set of related commands, a segmented control for one active local mode, a menu button for hidden secondary commands, and a confirmation dialog after a risky command needs review.

Learn the decision

Match the interaction to the person's task

Use a button group for a small visible set of related commands, a segmented control for one active local mode, a menu button for hidden secondary commands, and a confirmation dialog after a risky command needs review.

Button group

Use it when: A form, dialog, panel, card, or workflow footer needs two to four related visible commands.

Make this state clear: Default group with a clear label or surrounding context.

Observe the result: A user chooses Reset changes from a separated danger action and receives a clear reset result instead of accidentally resetting beside Continue.

Study the full pattern →

Segmented control

Use it when: There are a few mutually exclusive modes.

Make this state clear: Default selected segment.

Observe the result: Selecting a segment changes a nearby local mode, filter, or view immediately.

Study the full pattern →

Menu button

Use it when: A local object or toolbar has three to eight secondary commands.

Make this state clear: Closed trigger state with visible or accessible name.

Observe the result: A user opens Report actions, arrows to Duplicate report, activates it, and focus returns to the Report actions trigger with a status update.

Study the full pattern →

Confirmation dialog

Use it when: The action is destructive, irreversible, costly, security-sensitive, privacy-affecting, or externally visible.

Make this state clear: Pre-action state with an explicit consequential trigger.

Observe the result: Cancel, Escape, and Keep archive leave the archive unchanged and return focus to Delete archive.

Study the full pattern →

Practice the judgment: Imagine this situation: A destructive Delete button sits directly beside Continue and is triggered by input mistakes. Write the person's goal, choose one of these patterns, and show the state that helps the person continue. Use the decision rules and source trail below to explain your choice.

Review the underlying principle →

Decision dimensions

Dimension Button groupSegmented controlMenu buttonConfirmation dialog
UI or UX UI + UX - Grouped visible action buttonsUI + UX - Compact mode selectorUI + UX - Button-controlled popup menu of actions or linksUI + UX - Consequential alert decision
UI guidance Render a small group of visibly related action buttons with one clear scope, one dominant primary action when needed, lower-emphasis alternatives, consistent labels, visible focus, and stable spacing.Render a compact horizontal group with two to four adjacent segments, one selected state, visible focus, and stable sizing.Render a named button trigger, visible opened state, controlled popup, menu items, active item styling, disabled item state, separator or section grouping, and a safe way to distinguish destructive commands.Render an alert-style modal decision with a specific title, consequence description, safe cancellation, and a destructive action label that names the object or scope.
UX guidance Use a button group when users need to choose between a few related commands at the same workflow moment, such as saving, continuing, going back, cancelling, applying, resetting, or exporting in one local task.Avoid using segments for unrelated pages, hidden content sections, destructive actions, or choices that need long explanation.Make dismissal, activation, focus return, unavailable actions, and high-risk command handoff predictable so the menu behaves like a command chooser rather than a hidden form.Help the person reach a clear task outcome.
Good UI A form footer shows Save draft, Continue, and Cancel as one named action group, with Continue primary only after required work is saved.Two to four adjacent segments with a clear selected segment, visible focus ring, and readable labels that fit on one row.A table row has a Report actions button that opens a compact menu with Open, Rename, Duplicate, Archive, and an unavailable Export item.Delete Research archive? explains that 14 notes and shared links will be permanently removed, offers Keep archive, and labels the danger action Delete archive.
Bad UI A footer contains Save, Continue, Delete, Help, View report, and Open settings as identical primary buttons.Many cramped segments with truncated text.A primary Save action is hidden behind More while lower-priority icons remain visible.The red destructive action is enabled immediately and sits where users expect the routine primary button.
Good UX A user chooses Reset changes from a separated danger action and receives a clear reset result instead of accidentally resetting beside Continue.Selecting a segment changes a nearby local mode, filter, or view immediately.A user opens Report actions, arrows to Duplicate report, activates it, and focus returns to the Report actions trigger with a status update.Cancel, Escape, and Keep archive leave the archive unchanged and return focus to Delete archive.
Bad UX Users hesitate because Save, Submit, Continue, and Next are all high-emphasis buttons in the same group.Using segments for unrelated destinations.A user tabs into a menu and lands in a text input because the menu contains unrelated form controls.Every archive, filter, and dismiss action opens the same confirmation until users click through automatically.
Best fit A form, dialog, panel, card, or workflow footer needs two to four related visible commands.There are a few mutually exclusive modes.A local object or toolbar has three to eight secondary commands.The action is destructive, irreversible, costly, security-sensitive, privacy-affecting, or externally visible.
Avoid when The controls are mutually exclusive view modes that need a selected state.Options are full content sections needing tab semantics.The job is choosing a form value, selecting several values, or browsing a long list.The action is routine and easily reversible.
Required state Default group with a clear label or surrounding context.Default selected segment.Closed trigger state with visible or accessible name.Pre-action state with an explicit consequential trigger.
Accessibility burden Use native button elements for actions so Enter and Space activation, disabled behavior, and focus work predictably.Expose selected or pressed state and the group name.Use an actual button for the trigger when possible.Use alertdialog semantics or platform equivalent when the decision is urgent and requires a response.
Common misuse Putting unrelated actions into one row because the layout has space.Using segments for unrelated page navigation.Using a menu button for long value selection that should be a select, listbox, combobox, or multi-select.Asking users to confirm every routine action until they stop reading.

Button group

UI or UX
UI + UX - Grouped visible action buttons
UI guidance
Render a small group of visibly related action buttons with one clear scope, one dominant primary action when needed, lower-emphasis alternatives, consistent labels, visible focus, and stable spacing.
UX guidance
Use a button group when users need to choose between a few related commands at the same workflow moment, such as saving, continuing, going back, cancelling, applying, resetting, or exporting in one local task.
Good UI
A form footer shows Save draft, Continue, and Cancel as one named action group, with Continue primary only after required work is saved.
Bad UI
A footer contains Save, Continue, Delete, Help, View report, and Open settings as identical primary buttons.
Good UX
A user chooses Reset changes from a separated danger action and receives a clear reset result instead of accidentally resetting beside Continue.
Bad UX
Users hesitate because Save, Submit, Continue, and Next are all high-emphasis buttons in the same group.
Best fit
A form, dialog, panel, card, or workflow footer needs two to four related visible commands.
Avoid when
The controls are mutually exclusive view modes that need a selected state.
Required state
Default group with a clear label or surrounding context.
Accessibility burden
Use native button elements for actions so Enter and Space activation, disabled behavior, and focus work predictably.
Common misuse
Putting unrelated actions into one row because the layout has space.

Segmented control

UI or UX
UI + UX - Compact mode selector
UI guidance
Render a compact horizontal group with two to four adjacent segments, one selected state, visible focus, and stable sizing.
UX guidance
Avoid using segments for unrelated pages, hidden content sections, destructive actions, or choices that need long explanation.
Good UI
Two to four adjacent segments with a clear selected segment, visible focus ring, and readable labels that fit on one row.
Bad UI
Many cramped segments with truncated text.
Good UX
Selecting a segment changes a nearby local mode, filter, or view immediately.
Bad UX
Using segments for unrelated destinations.
Best fit
There are a few mutually exclusive modes.
Avoid when
Options are full content sections needing tab semantics.
Required state
Default selected segment.
Accessibility burden
Expose selected or pressed state and the group name.
Common misuse
Using segments for unrelated page navigation.

Menu button

UI or UX
UI + UX - Button-controlled popup menu of actions or links
UI guidance
Render a named button trigger, visible opened state, controlled popup, menu items, active item styling, disabled item state, separator or section grouping, and a safe way to distinguish destructive commands.
UX guidance
Make dismissal, activation, focus return, unavailable actions, and high-risk command handoff predictable so the menu behaves like a command chooser rather than a hidden form.
Good UI
A table row has a Report actions button that opens a compact menu with Open, Rename, Duplicate, Archive, and an unavailable Export item.
Bad UI
A primary Save action is hidden behind More while lower-priority icons remain visible.
Good UX
A user opens Report actions, arrows to Duplicate report, activates it, and focus returns to the Report actions trigger with a status update.
Bad UX
A user tabs into a menu and lands in a text input because the menu contains unrelated form controls.
Best fit
A local object or toolbar has three to eight secondary commands.
Avoid when
The job is choosing a form value, selecting several values, or browsing a long list.
Required state
Closed trigger state with visible or accessible name.
Accessibility burden
Use an actual button for the trigger when possible.
Common misuse
Using a menu button for long value selection that should be a select, listbox, combobox, or multi-select.

Confirmation dialog

UI or UX
UI + UX - Consequential alert decision
UI guidance
Render an alert-style modal decision with a specific title, consequence description, safe cancellation, and a destructive action label that names the object or scope.
UX guidance
Help the person reach a clear task outcome.
Good UI
Delete Research archive? explains that 14 notes and shared links will be permanently removed, offers Keep archive, and labels the danger action Delete archive.
Bad UI
The red destructive action is enabled immediately and sits where users expect the routine primary button.
Good UX
Cancel, Escape, and Keep archive leave the archive unchanged and return focus to Delete archive.
Bad UX
Every archive, filter, and dismiss action opens the same confirmation until users click through automatically.
Best fit
The action is destructive, irreversible, costly, security-sensitive, privacy-affecting, or externally visible.
Avoid when
The action is routine and easily reversible.
Required state
Pre-action state with an explicit consequential trigger.
Accessibility burden
Use alertdialog semantics or platform equivalent when the decision is urgent and requires a response.
Common misuse
Asking users to confirm every routine action until they stop reading.
Decision rules
  • Prefer a button group when two to four related actions should remain visible together, such as Save and cancel, Back and continue, or Apply, Reset, and Export for one local task.
  • Prefer a segmented control when the buttons represent mutually exclusive modes or views and exactly one option should stay selected after activation.
  • Prefer a menu button when the command set is secondary, contextual, or too long to keep visible, and one named trigger can reveal the extra actions without crowding the surface.
  • Prefer a confirmation dialog after the user has already chosen a clearly labelled high-risk command and must review the affected object, consequence, and cancellation path.
  • Do not use a button group as a navigation bar; if the options move between sections, use tabs, side navigation, breadcrumbs, or pagination according to the information structure.
  • Do not put unrelated actions into one button group just because they fit horizontally; spatial grouping tells users the commands share one scope or workflow moment.
  • Keep one primary action in ordinary task button groups and use secondary, tertiary, or danger treatments to communicate lower priority or risk.
  • Separate destructive commands from safe submit or navigation commands unless the workflow explicitly needs a destructive primary action with a clear review or recovery path.
  • Stack or wrap the group deliberately on narrow screens while preserving source order, visible labels, and hit targets; do not turn the group into unlabeled icons to save space.
  • If a button remains unavailable, show why the command is blocked or disable only while a previous activation is processing.
Inspect live examples
Failure modes
  • Two primary buttons compete for the same task moment and users cannot tell which one is recommended.
  • A destructive Delete button sits directly beside Continue and is triggered by input mistakes.
  • The group mixes navigation, form submission, filtering, and destructive commands with identical styling.
  • A compact row of action buttons is given aria-pressed states even though activation runs commands rather than selecting a mode.
  • The group collapses to icons on mobile and loses action names, object scope, and accessible names.
  • An unavailable action is greyed out with no reason, recovery path, or processing state.
  • Too many buttons remain visible instead of moving secondary commands into a menu button or toolbar overflow.
  • Links to ordinary content are styled as buttons inside the group when text links or navigation would be clearer.

Saved items