MENU

When to Use

Example: more menu

  • Providing contextual actions triggered by a button, icon, or right-click
  • Offering navigation options that don't fit in the main nav bar
  • Grouping secondary actions (edit, duplicate, delete) behind a "more" trigger
  • Not suitable for complex forms or multi-step workflows — use Dialog or a dedicated page

Usage Guidelines

DO

Group items by frequency of use or logical relationship; place destructive actions in the last group using Error color style

Don’t

Don't exceed 7 items per group or 3 groups total — excessive items make the menu too long

DO

Use dividers to separate functional groups; keep icon style consistent within a group (all or none)

Don’t

Don't use menus for complex form operations. Don't nest more than 2 levels of submenus

DO

Keep icon style consistent within a group — use all icons or no icons

Don’t

Don't mix icon and non-icon items within the same menu

Interaction Behavior

StateDescription
DefaultWhite background, normal text color
HoverBackground highlights to --ds-color-background-tertiary
ActivatedBackground --ds-color-brand-accent1-background, text --ds-color-brand-accent1-default
DisabledText grays out, pointer-events: none
Keyboard navigation↑↓ move focus; → expand submenu; ← / Escape close; Enter/Space trigger

Accessibility

RequirementImplementation
Menu containerrole="menu"
Menu itemsrole="menuitem"
Checkbox menu itemrole="menuitemcheckbox" + aria-checked
Active itemaria-current="true"
Disabled itemaria-disabled="true"
Submenuaria-haspopup="menu" + aria-expanded
Focus managementFocus moves to first item on open; returns to trigger on close