className | String | | additional css class of root dom node |
mode | String | vertical | one of ["horizontal","inline","vertical-left","vertical-right"] |
---|
activeKey | String | | initial and current active menu item's key. |
---|
defaultActiveFirst | Boolean | false | whether active first menu item when show if activeKey is not set or invalid |
---|
multiple | Boolean | false | whether allow multiple select |
---|
selectable | Boolean | true | allow selecting menu items |
---|
selectedKeys | String[] | [] | selected keys of items |
---|
defaultSelectedKeys | String[] | [] | initial selected keys of items |
---|
openKeys | String[] | [] | open keys of SubMenuItem |
---|
defaultOpenKeys | String[] | [] | initial open keys of SubMenuItem |
---|
onSelect | function({key:String, item:ReactComponent, domEvent:Event, selectedKeys:String[]}) | | called when select a menu item |
---|
onClick | function({key:String, item:ReactComponent, domEvent:Event, keyPath: String[]}) | | called when click a menu item |
---|
onOpenChange | (openKeys:String[]) => void | | called when open/close sub menu |
---|
onDeselect | function({key:String, item:ReactComponent, domEvent:Event, selectedKeys:String[]}) | | called when deselect a menu item. only called when allow multiple |
---|
triggerSubMenuAction | Enum { hover, click } | hover | which action can trigger submenu open/close |
---|
openAnimation | {enter:function,leave:function}|String | | animate when sub menu open or close. see rc-motion for object type. |
---|
openTransition | String | | css transitionName when sub menu open or close |
---|
subMenuOpenDelay | Number | 0 | delay time to show popup sub menu. unit: s |
---|
subMenuCloseDelay | Number | 0.1 | delay time to hide popup sub menu. unit: s |
---|
forceSubMenuRender | Boolean | false | whether to render submenu even if it is not visible |
---|
getPopupContainer | Function(menuDOMNode): HTMLElement | () => document.body | Where to render the DOM node of popup menu when the mode is horizontal or vertical |
---|
builtinPlacements | Object of alignConfigs for dom-align | see placements.ts | Describes how the popup menus should be positioned |
---|
itemIcon | ReactNode | (props: MenuItemProps) => ReactNode | | Specify the menu item icon. |
---|
expandIcon | ReactNode | (props: SubMenuProps & { isSubMenu: boolean }) => ReactNode | | Specify the menu item icon. |
---|
direction | String | | Layout direction of menu component, it supports RTL direction too. |
---|
inlineIndent | Number | 24 | Padding level multiplier. Right or left padding depends on param "direction". |
---|