Menu
Components
Menu()
Menu(
props
,context
?):ReactNode
A Menu component makes it easier to add an ellipsis menu in your app. A typical use case is for saving UI space by hiding less critical options under a single icon. A Menu component takes all the props of a List component, plus more:
Parameters
Parameter | Type |
---|---|
props | MenuProps |
context ? | any |
Returns
ReactNode
Example
<Menu
anchor={{
icon: <EllipsisHorizontalIcon />,
variant: 'primary',
greyBg: true,
iconOnly: true,
'aria-label': 'settings',
}}
items={dropDownActions}
/>
Source
libs/design-system-core/src/components/Menu/index.tsx:36
Props
MenuProps
MenuProps:
object
&ListProps
Type declaration
Member | Type |
---|---|
anchor | ButtonProps |
disabled | boolean |
onMenuClick | (e ) => void |