Menu
Imports
import {Menu} from 'material-expressive-react';
import {Menu} from 'material-expressive-react/menu';
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| context | boolean | No | If true, removes gaps/dividers styling for compact context menus. | |
| defaultValue | string | string[] | No | Uncontrolled selection. | |
| gap | string | number | No | Gap between menu items. Sets --mer-menu-item-gap. | |
| groupGap | string | number | No | ||
| height | string | number | No | ||
| maxHeight | string | number | No | ||
| onValueChange | ((value: string | string[]) => void) | No | ||
| scroll | boolean | No | ||
| selectType | enum | single | No | |
| size | enum | No | ||
| value | string | string[] | No | Controlled selection. | |
| variant | enum | standard | No | |
| width | string | number | No |
Events
This component does not explicitly re-emit DOM events via wrapper props.
Slots
Material Web components frequently use named slots. In React, you can pass slot="..." on children (e.g. <Icon slot="icon" />).
If you need to slot a child component that does not accept a slot prop, use the Slotted utility (see Utilities → Slotted).
Examples
See Storybook for live examples and variants.