MenuItem API
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';
Component name
The nameJoyMenuItem
can be used when providing default props or style overrides in the theme.Props
Name | Type | Default | Description |
---|---|---|---|
children | node | 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. |
selected | bool | false | 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.