MenuPreview API
API reference docs for the React MenuPreview component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import MenuPreview from '@mui/material/MenuPreview';Props of the native component are also available.
| Name | Type | Default | Description |
|---|---|---|---|
| children | node | - | The content of the menu. |
| closeParentOnEsc | bool | false | When in a submenu, determines whether pressing the Escape key closes the entire menu. |
| defaultOpen | bool | false | Whether the menu is initially open. |
| disabled | bool | false | Whether the component should ignore user interaction. |
| highlightItemOnHover | bool | true | Whether moving the pointer over items should highlight them. |
| loopFocus | bool | true | Whether to loop keyboard focus back to the first item. |
| modal | bool | true | Determines if the menu enters a modal state when open. |
| onOpenChange | func | - | Event handler called when the menu is opened or closed. |
| onOpenChangeComplete | func | - | Event handler called after any animations complete when the menu is opened or closed. |
| open | bool | - | Whether the menu is currently open. |
| orientation | 'horizontal' | 'vertical' | 'vertical' | The visual orientation of the menu. |
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.