Skip to content

Split button ​

One primary action and its alternatives, joined in one labelled control.

contextmenuactions-contextmenuactionsshell--split-buttonOpen in Storybook ↗

When to use ​

  • An entity or a selection has exactly one action people use most, plus a few related ones: Open record ▾ with Duplicate, Export, Delete.
  • The primary action should be one click away and the rest should still be findable under the same control.

When not to use ​

  • Only one action: use a plain button.
  • No clear primary action: use the labelled Actions menu on its own (overflow menu).
  • Several actions that all seem primary: pick one. Only one action per subject is shown as the primary segment; other promoted actions lead the menu. See action discovery.

Anatomy ​

  1. Primary segment: a small primary button with a verb label. It runs its action straight away.
  2. Chevron segment: a small primary button that only opens the menu. A divider (--split-button-divider) separates it from the primary segment; --split-button-chevron-padding-x sets its width.
  3. Menu: opens under the chevron. Items have an optional icon (--menu-icon-size) and a label (--menu-item-padding, --menu-item-gap). Destructive items use --color-danger-ink and always sit last.

Both segments share one capsule: the inner corners are square, the outer corners keep --radius-button.

States ​

StateWhat you seeTrigger
Restingaccent fill, chevron points down—
Hovereach segment shows its own hover fillpointer
Focusfocus ring on the focused segmentkeyboard
Openchevron points up and takes --color-accent-hover; menu under the chevronclick or ↓ on the chevron
Disabled itemitem in disabled ink with a help icon; its tooltip says whythe action does not apply
Small screen (< 48rem)the menu opens as a bottom sheetviewport width

The menu opens under the chevron, aligned to its left edge. Near the right edge of the window it aligns to the chevron's right edge, and near the bottom it opens upwards.

Keyboard & accessibility ​

KeyOn the chevronIn the menu
Tabmoves from the primary segment to the chevroncloses the menu, focus back on the chevron
Enter / Spaceopens or closes the menuruns the focused item
↓opens the menu, focus on the first itemnext item (wraps)
↑—previous item (wraps)
Home / End—first / last item
Escape—closes the menu, focus back on the chevron

A click outside the menu or a scroll closes it without running anything.

  • The two segments sit in a role="group".
  • The primary segment is named by its label.
  • The chevron is named More actions for {title} when it knows what it acts on, otherwise More actions. It has aria-haspopup="menu" and aria-expanded.
  • The menu is a role="menu" with role="menuitem" items; a disabled item has aria-disabled="true".

Content ​

  • The primary label is a short verb phrase: Open record, Save.
  • Menu items start with a verb: Duplicate, Export, Delete.
  • Whether an item is destructive comes from the action's configuration (tone: Danger), not from its label. The menu then colours it and moves it to the end.
  • Keep the menu short.
  • Translation keys for the chevron: contextMenu.more-actions and contextMenu.more-actions-for.

Overflow menu · Colour · Accessibility

Powered by Elody - Open Source Semantic Data Platform