Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

menu

v4.5.2arrow_drop_down
v4.5.2
v3.9.2
STATUS
Passing
DOWNLOADS
2,132
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
4 months ago
SIZE
32 KB
Menus display a list of choices on temporary surfaces.
2 contributors
Install menu as a package?
Copied
npm i @bit/mui-org.material-ui.menu
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
chevron_left
chevron_right
Properties
NameTypeDescription
anchorEl
object | function

The DOM element used to set the position of the menu.

autoFocus
bool

If true (Default) will focus the [role="menu"] if no focusable child is found. Disabled children are not focusable. If you set this prop to false focus will be placed on the parent modal container. This has severe accessibility implications and should only be considered if you manage focus otherwise.

children
node

Menu contents, normally MenuItems.

classes
(required)
object

Override or extend the styles applied to the component. See CSS API below for more details.

disableAutoFocusItem
bool

When opening the menu will not focus the active item but the [role="menu"] unless autoFocus is also set to false. Not using the default means not following WAI-ARIA authoring practices. Please be considerate about possible accessibility implications.

MenuListProps
object

Props applied to the MenuList element.

onClose
function

The event source of the callback.

onEnter
function

Callback fired before the Menu enters.

onEntered
function

Callback fired when the Menu has entered.

onEntering
function

Callback fired when the Menu is entering.

onExit
function

Callback fired before the Menu exits.

onExited
function

Callback fired when the Menu has exited.

onExiting
function

Callback fired when the Menu is exiting.

open
(required)
bool

If true, the menu is visible.

PaperProps
object
PopoverClasses
object

classes prop applied to the Popover element.

transitionDuration
number | {"enter":"number","exit":"number"} | 'auto'

The length of the transition in ms, or ‘auto’

variant
'menu' | 'selectedMenu'

The variant to use. Use menu to prevent selected items from impacting the initial focus and the vertical alignment relative to the anchor element.