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.

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. To learn how to add your own colors, check out Themed components—Extend colors.
selectedboolfalse
If true, the component is selected.
variant'contained'
| 'light'
| 'outlined'
| 'text'
| string
'plain'
The global variant to use. To learn how to add your own variants, check out Themed components—Extend variants.

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.

Theme default props

You can use JoyMenuItem to change the default props of this component with the theme.