Skip to content

MenuItem API

API reference docs for the React MenuItem component. Learn about the props, CSS, and other APIs of this exported module.

Demos

For examples and details on the usage of this React component, visit the component demo pages:

Import

import MenuItem from '@mui/joy/MenuItem';
// or
import { MenuItem } from '@mui/joy';
You can learn about the difference by reading this guide on minimizing bundle size.

Component name

The name JoyMenuItem can be used when providing default props or style overrides in the theme.

Props

NameTypeDefaultDescription
childrennode
The content of the component.
color'danger'
| 'info'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string
selected ? 'primary' : 'neutral'
The color of the component. It supports those theme colors that make sense for this component.
selectedboolfalse
If true, the component is selected.
variant'contained'
| 'light'
| 'outlined'
| 'text'
| string
'plain'
The variant to use.

The ref is forwarded to the root element.

Inheritance

While not explicitly documented above, the props of the ListItemButton component are also available on MenuItem. You can take advantage of this to target nested components.