Skip to content

Menu

A menu of actions, checkboxes, groups and submenus, opened by pressing its child or right-click / long-press.

Group: Overlays · Kind: native

example
openOn · press
openOn · contextmenu

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-menu on Web
exponential-ui-menu on iOS
exponential-ui-menu on Android
exponential-ui-menu on Desktop
Prop Type Required Bindable Description
label string – – The default trigger’s text when no child is given.
icon icon – – The default trigger’s icon.
items [menuItem] yes – The entries in order.
openOn press | contextmenu – – A press on the child, or the context gesture over it. Default "press".
  • on.select: runs an action

None.

one

No basic catalog component maps here.

A native component: every renderer paints it directly.

Role: menu

menu / menuitem / menuitemcheckbox / group / separator; openOn: contextmenu opens at the pointer

Keys Action
Enter Space ArrowDown on the trigger open on the first item; ArrowUp: open on the last
– Shift+F10 or the Menu key on the focused child (contextmenu): open at the child
ArrowDown ArrowUp next/previous item (wraps, skips disabled)
Home End first/last item
Enter Space run the item (a checkbox item toggles and stays open)
ArrowRight on a submenu open it; ArrowLeft or Escape inside: close it
– A searchable submenu opens with its filter input focused: typing filters, ArrowDown/ArrowUp move the active row, Enter picks it, ArrowLeft with the caret at the start or Escape closes it
Escape close and return focus to the trigger
Typing a letter the next item starting with it

Recipe parts: Menu/trigger Menu/content Menu/item Menu/separator Menu/label Menu/shortcut Menu/check Menu/submenuIndicator Menu/head Menu/search Menu/count Menu/list Menu/empty Menu/fade

Keyed by: openOn :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover

Themes · Write a theme

Dialog · Drawer · DockCard · AlertDialog · Popover · Tooltip · Toast