While not explicitly documented above, the props of the ListItemButton component are also available in 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.
These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.
.Mui-disabledSTATE
State class applied to the inner component element if disabled={true}.
.Mui-focusVisibleSTATE
State class applied to the component's focusVisibleClassName prop.
.Mui-selectedSTATE
State class applied to the root element if selected={true}.
.MuiMenuItem-colorContext
Class name applied to the root element when color inversion is triggered.
.MuiMenuItem-colorDanger
Class name applied to the root element if color="danger".
.MuiMenuItem-colorNeutral
Class name applied to the root element if color="neutral".
.MuiMenuItem-colorPrimary
Class name applied to the root element if color="primary".
.MuiMenuItem-colorSuccess
Class name applied to the root element if color="success".
.MuiMenuItem-colorWarning
Class name applied to the root element if color="warning".
.MuiMenuItem-variantOutlined
State class applied to the root element if variant="outlined".
.MuiMenuItem-variantPlain
State class applied to the root element if variant="plain".
.MuiMenuItem-variantSoft
State class applied to the root element if variant="soft".
.MuiMenuItem-variantSolid
State class applied to the root element if variant="solid".
Have any feedback about this new API display design?
We've heard from you and iterated on making the design of API content documentation more scalable and easier to parse! We value your input, so please don't hesitate to share any additional feedback you may have.