Skip to content
+

Menu

The Menu components provide your users with a list of options on temporary surfaces.

import { Dropdown } from '@mui/base/Dropdown';
// or
import { Dropdown } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

If true, the dropdown is initially open.

Type:

bool

Callback fired when the component requests to be opened or closed.

Type:

func

Allows to control whether the dropdown is open. This is a controlled counterpart of defaultOpen.

Type:

bool


The component cannot hold a ref.

import { Menu } from '@mui/base/Menu';
// or
import { Menu } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Props of the native component are also available.

A ref with imperative actions that can be performed on the menu.

Type:

ref

Function called when the items displayed in the menu change.

Type:

func

The props used for each slot inside the Menu.

Type:

{ listbox?: func | object, root?: func | object }

Default:

{}

The components used for each slot inside the Menu. Either a string to use a HTML element or a component.

See Slots API below for more details.

Type:

{ listbox?: elementType, root?: elementType }

Default:

{}


The ref is forwarded to the root element.

To learn how to customize the slot, check out the Overriding component structure guide.

The component that renders the popup element.

Default: 'div'

Global class: .MuiMenu-root


The component that renders the listbox.

Default: 'ul'

Global class: .MuiMenu-listbox



You can override the style of the component using one of these customization options:

These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.

State class applied to the root element if open={true}.




import { MenuButton } from '@mui/base/MenuButton';
// or
import { MenuButton } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Props of the native component are also available.

Class name applied to the root element.

Type:

string

If true, the component is disabled.

Type:

bool

Default:

false

If true, allows a disabled button to receive focus.

Type:

bool

Default:

false

Label of the button

Type:

string

The components used for each slot inside the MenuButton. Either a string to use a HTML element or a component.

Type:

{ root?: func | object }

Default:

{}

The props used for each slot inside the MenuButton.

See Slots API below for more details.

Type:

{ root?: elementType }

Default:

{}


The ref is forwarded to the root element.

To learn how to customize the slot, check out the Overriding component structure guide.

The component that renders the root.

Default: 'button'

Global class: .MuiMenuButton-root



You can override the style of the component using one of these customization options:

These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.

State class applied to the root element if active={true}.


State class applied to the root element if disabled={true}.


State class applied to the root element if the associated menu is open.




import { MenuItem } from '@mui/base/MenuItem';
// or
import { MenuItem } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Props of the native component are also available.

A text representation of the menu item's content. Used for keyboard text navigation matching.

Type:

string

The props used for each slot inside the MenuItem.

Type:

{ root?: func | object }

Default:

{}

The components used for each slot inside the MenuItem. Either a string to use a HTML element or a component.

See Slots API below for more details.

Type:

{ root?: elementType }

Default:

{}


The ref is forwarded to the root element.

To learn how to customize the slot, check out the Overriding component structure guide.

The component that renders the root.

Default: 'li'

Global class: .MuiMenuItem-root



You can override the style of the component using one of these customization options:

These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.

State class applied to the root button element if disabled={true}.


State class applied to the root button element if focusVisible={true}.