Basic

Pass menu an items array and wrap a trigger, and the menu opens when the pointer rests on it.

Items with icons

Give each item an icon to show a glyph before its label, like edit, copy and download on a row's overflow menu.

Groups and dividers

Set an item's type to "group" to give a band of items a heading, or to "divider" to draw a line between bands.

Danger and disabled

Mark an item danger to color it as destructive, or disabled to gray it out and ignore its clicks.

Keyboard shortcuts

Put a shortcut hint in an item's extra to show it muted at the end of the row, like ⌘C next to Copy.
Add children to a menu item to open a nested submenu from it.

Trigger modes

Set trigger to ["click"] or ["contextMenu"] to open the menu on a click or a right-click instead of the default hover.

Placement

Set placement to open the menu above, below or beside its trigger, lined up with its start, center or end.

Arrow

Set arrow to point the menu at its trigger, and arrow={{ pointAtCenter: true }} to aim it at the center of a wide one.

Disabled

Set disabled to keep the menu from opening, which also disables the button you pass as the trigger.
Handle menu.onClick once for the whole menu and branch on the clicked item's key, like duplicate, archive or export.

Selectable

Set menu.selectable with selectedKeys to highlight the current choice, like a sort order the trigger also shows.

Multi-select

Add menu.multiple to selectable to toggle several items, and the menu stays open between clicks, like a column picker.

Staying open

Control open and ignore closes whose info.source is "menu", so item clicks leave the menu open until Done.
Return your own node from popupRender to show any content in the popup instead of a menu, like a share panel where you invite people, change what each one can do and set who the link opens for.

Split button

Put a Button and a Dropdown in Space.Compact to build a split button: one main action and a menu of variations.

Context menu

Set trigger to ["contextMenu"] to replace the browser menu on an area, and the menu opens at the pointer.

Selection actions

Control open and pass an empty trigger to open a menu under selected text, with actions to copy, highlight or bold it, or turn it into a tag.

In context

The component inside real screens, with the components it usually sits beside.

Team table

A team table with an overflow menu on each row, where removing a member asks for confirmation in a dialog.

Account menu

An avatar that opens an account menu, with the user's name and plan in a header above the menu items.

API Reference