Menu2Submenu API
API reference docs for the React Menu2Submenu component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import MenuSubmenu from '@mui/material/Unstable_Menu2Submenu';Controls a submenu without rendering a DOM element.
Use MuiMenu2Submenu.defaultProps to set behavior defaults in the theme.
| Name | Type | Default | Description |
|---|---|---|---|
| actionsRef | { current?: { close: func, unmount: func } } | - | A ref to imperative actions.
|
| children | node | - | The submenu trigger and popup. |
| closeParentOnEsc | bool | false | When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. |
| defaultOpen | bool | false | Whether the menu is initially open. |
| highlightItemOnHover | bool | true | Whether moving the pointer over items should highlight them. Disabling this prop allows CSS |
| loopFocus | bool | true | Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. |
| onOpenChange | func | - | Event handler called when the submenu is opened or closed. Signature: function(open: boolean, eventDetails: object) => void
|
| onOpenChangeComplete | func | - | Event handler called after the opening or closing animation completes. Signature: function(open: boolean) => void
|
| open | bool | - | Whether the menu is currently open. |
Source code
If you did not find the information in this page, consider having a look at the implementation of the component for more detail.