Actions & Navigation

Menu

A menu displays a list of actions or options that a user can choose.

A menu displays a list of actions or options that a user can choose.

Separators#

Sections#

Single select#

Multiple select#

Preselected#

Component props#

NameTypeDescription
selectionModeSelectionMode"none" | "single" | "multiple"
selectedKeysstring[]Controlled selected keys
defaultSelectedKeysstring[]Default selected keys
onSelectionChange(keys: Selection) => voidCalled when selection changes
variant'default' | 'plain'plain drops the popup surface (border, shadow, background) when the menu is embedded in another popup, such as a Navbar dropdown

With selectionMode="single" items render as radio items and with "multiple" as checkbox items, so aria-checked is exposed to assistive technology.

NameTypeDescription
idstringUnique item identifier
iconReactNodeIcon displayed before label
labelstringItem label text
isDisabledbooleanDisables the item
showCheckedbooleanShows the selected indicator. Defaults to true only when the menu has a selection mode
showSubMenuIconbooleanShows submenu arrow icon
closeOnSelectbooleanWhether picking the item closes the menu. Defaults to false for multiple selection

Renders a right-aligned keyboard hint inside a MenuItem.