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(oftencrate::Buttonor an icon button). - Set
trigger_type:Click(default) orHoverfor pointer-driven open. - Add
MenuItemchildren with distinctvaluestrings. - Handle
on_selectby matching the chosenvalue.
Click opens an action list. Match each item's value in on_select.
Ellipsis or kebab trigger saves toolbar space; optional item icons reinforce command meaning. Pair icon-only triggers with aria-label on the button wrapper.
Opens on pointer enter for low-risk, discoverable command previews—closes after a short leave delay.
Brand-tinted menu surface matches primary app chrome—use inside branded headers or hero regions.
Dark inverted surface for menus anchored on dark or image-heavy toolbars.
Flips placement above the trigger when space below is tight.
Disabled menu items remain visible but cannot be selected.