Menu

Menu opens a list of actions from any trigger you place in MenuTrigger — icon buttons, links, or custom controls. Handle choices in on_select by matching each MenuItem value.

Use MenuButton when a standard text button trigger is enough. Use Menu for hover open, custom triggers, placement, or menu surface appearance (Brand, Inverted). Submenus are not supported yet — nest a future Menu pattern when added.

  • Action lists from icon buttons, split controls, or custom triggers
  • Hover-open menus (MenuTriggerType::Hover) or explicit placement
  • Pickers, detail panels, or form fields — use Popover instead
  • Put the trigger in MenuTrigger (often crate::Button or an icon button).
  • Set trigger_type: Click (default) or Hover for pointer-driven open.
  • Add MenuItem children with distinct value strings.
  • Handle on_select by matching the chosen value.
Default

Click opens an action list. Match each item's value in on_select.

Icon trigger with `on_click`

Ellipsis or kebab trigger saves toolbar space; optional item icons reinforce command meaning. Pair icon-only triggers with aria-label on the button wrapper.

Hover trigger

Opens on pointer enter for low-risk, discoverable command previews—closes after a short leave delay.

Brand appearance

Brand-tinted menu surface matches primary app chrome—use inside branded headers or hero regions.

Inverted appearance

Dark inverted surface for menus anchored on dark or image-heavy toolbars.

Position (top)

Flips placement above the trigger when space below is tight.

Disabled item

Disabled menu items remain visible but cannot be selected.

Keyboard navigation

Arrow keys move focus between items; Enter selects the focused item.