| activeKey |
string |
- |
Controlled active item key. |
| builtinPlacements |
Record<string, any> |
- |
Popup alignment placements for sub menus. |
| className |
string |
- |
Class name for the root menu. |
| classNames |
Partial<Record<'list' | 'listTitle', string>> |
- |
Semantic class names for menu slots. |
| defaultActiveFirst |
boolean |
false |
Focus the first enabled item when active key is absent. |
| defaultOpenKeys |
string[] |
[] |
Initial open sub menu keys. |
| defaultSelectedKeys |
string[] |
[] |
Initial selected item keys. |
| defaultMotions |
Partial<Record<MenuMode | 'other', CSSMotionProps>> |
- |
Motion config by menu mode. |
| direction |
'ltr' | 'rtl' |
- |
Layout direction. |
| disabled |
boolean |
false |
Disable all menu interactions. |
| disabledOverflow |
boolean |
false |
Disable overflow measurement. |
| expandIcon |
ReactNode | (props: RenderIconInfo) => ReactNode |
- |
Custom sub menu expand icon. |
| forceSubMenuRender |
boolean |
false |
Render popup sub menus before they are opened. |
| getPopupContainer |
(node: HTMLElement) => HTMLElement |
- |
Container for popup sub menus. |
| inlineCollapsed |
boolean |
- |
Collapse inline menu layout. |
| inlineIndent |
number |
24 |
Indent width for inline mode. |
| itemIcon |
ReactNode | (props: RenderIconInfo) => ReactNode |
- |
Custom item icon. |
| items |
ItemType[] |
- |
Menu item configuration. |
| mode |
'horizontal' | 'vertical' | 'inline' |
vertical |
Menu display mode. |
| motion |
CSSMotionProps |
- |
Motion config for menu transitions. |
| multiple |
boolean |
false |
Allow multiple selected items. |
| openKeys |
string[] |
- |
Controlled open sub menu keys. |
| overflowedIndicator |
ReactNode |
"..." |
Indicator rendered for overflowed items. |
| popupRender |
(node, info) => ReactNode |
- |
Customize popup menu rendering. |
| prefixCls |
string |
rc-menu |
Class name prefix. |
| rootClassName |
string |
- |
Class name for the root wrapper. |
| selectable |
boolean |
true |
Allow item selection. |
| selectedKeys |
string[] |
- |
Controlled selected item keys. |
| styles |
Partial<Record<'list' | 'listTitle', CSSProperties>> |
- |
Semantic styles for menu slots. |
| subMenuCloseDelay |
number |
0.1 |
Delay in seconds before closing popup sub menus. |
| subMenuOpenDelay |
number |
0.1 |
Delay in seconds before opening popup sub menus. |
| triggerSubMenuAction |
'click' | 'hover' |
hover |
Interaction that opens sub menus. |
| onClick |
(info: MenuInfo) => void |
- |
Triggered when an item is clicked. |
| onDeselect |
(info: SelectInfo) => void |
- |
Triggered when an item is deselected. |
| onOpenChange |
(openKeys: string[]) => void |
- |
Triggered when open keys change. |
| onSelect |
(info: SelectInfo) => void |
- |
Triggered when an item is selected. |