Menu

Menu

Props

Name Type Default Description
anchorEl object The DOM element used to set the position of the menu.
children node Menu contents, normally MenuItems.
classes object Override or extend the styles applied to the component. See CSS API below for more details.
MenuListProps object Properties applied to the MenuList element.
onClose func Callback fired when the component requests to be closed.

Signature:
function(event: object) => void
event: The event source of the callback
onEnter func Callback fired before the Menu enters.
onEntered func Callback fired when the Menu has entered.
onEntering func Callback fired when the Menu is entering.
onExit func Callback fired before the Menu exits.
onExited func Callback fired when the Menu has exited.
onExiting func Callback fired when the Menu is exiting.
openĀ * bool If true, the menu is visible.
PopoverClasses object classes property applied to the Popover element.
transitionDuration union: number |
 {enter?: number, exit?: number} |
 enum: 'auto'

'auto' The length of the transition in ms, or 'auto'

Any other properties supplied will be spread to the root element.

CSS API

You can override all the class names injected by Material-UI thanks to the classes property. This property accepts the following keys:

  • paper

Have a look at overriding with classes section and the implementation of the component for more detail.

If using the overrides key of the theme as documented here, you need to use the following style sheet name: MuiMenu.

Inheritance

The properties of the Popover component are also available.

Demos