rc-menu
- Version 9.15.1
- Published
- 256 kB
- 6 dependencies
- MIT license
Install
npm i rc-menu
yarn add rc-menu
pnpm add rc-menu
Overview
menu ui component for react
Index
Variables
Functions
Interfaces
MenuProps
- activeKey
- builtinPlacements
- children
- defaultActiveFirst
- defaultMotions
- defaultOpenKeys
- defaultSelectedKeys
- direction
- disabled
- disabledOverflow
- expandIcon
- forceSubMenuRender
- getPopupContainer
- inlineCollapsed
- inlineIndent
- itemIcon
- items
- mode
- motion
- multiple
- onClick
- onDeselect
- onOpenChange
- onSelect
- openKeys
- overflowedIndicator
- overflowedIndicatorPopupClassName
- prefixCls
- rootClassName
- selectable
- selectedKeys
- subMenuCloseDelay
- subMenuOpenDelay
- triggerSubMenuAction
Type Aliases
Variables
variable ExportMenu
const ExportMenu: any;
variable Item
const Item: React.ForwardRefExoticComponent<any>;
variable ItemGroup
const ItemGroup: React.ForwardRefExoticComponent<any>;
variable MenuItem
const MenuItem: React.ForwardRefExoticComponent<any>;
variable MenuItemGroup
const MenuItemGroup: React.ForwardRefExoticComponent<any>;
variable SubMenu
const SubMenu: React.ForwardRefExoticComponent<any>;
Functions
function Divider
Divider: ({ className, style }: DividerProps) => React.JSX.Element;
function useFullPath
useFullPath: (eventKey?: string) => string[];
Interfaces
interface MenuItemGroupProps
interface MenuItemGroupProps extends Omit<MenuItemGroupType, 'type' | 'children' | 'label'> {}
interface MenuItemProps
interface MenuItemProps extends Omit<MenuItemType, 'label' | 'key' | 'ref'>, Omit< React.HTMLAttributes<HTMLLIElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onSelect' > {}
interface MenuProps
interface MenuProps extends Omit< React.HTMLAttributes<HTMLUListElement>, 'onClick' | 'onSelect' | 'dir' > {}
property activeKey
activeKey?: string;
property builtinPlacements
builtinPlacements?: BuiltinPlacements;
property children
children?: React.ReactNode;
Deprecated
Please use
items
instead
property defaultActiveFirst
defaultActiveFirst?: boolean;
property defaultMotions
defaultMotions?: Partial<{ [key in MenuMode | 'other']: CSSMotionProps;}>;
Default menu motion of each mode
property defaultOpenKeys
defaultOpenKeys?: string[];
property defaultSelectedKeys
defaultSelectedKeys?: string[];
property direction
direction?: 'ltr' | 'rtl';
direction of menu
property disabled
disabled?: boolean;
property disabledOverflow
disabledOverflow?: boolean;
Disable auto overflow. Pls note the prop name may refactor since we do not final decided.
property expandIcon
expandIcon?: RenderIconType;
property forceSubMenuRender
forceSubMenuRender?: boolean;
property getPopupContainer
getPopupContainer?: (node: HTMLElement) => HTMLElement;
property inlineCollapsed
inlineCollapsed?: boolean;
property inlineIndent
inlineIndent?: number;
property itemIcon
itemIcon?: RenderIconType;
property items
items?: ItemType[];
property mode
mode?: MenuMode;
property motion
motion?: CSSMotionProps;
Menu motion define. Use
defaultMotions
if you need config motion of each mode
property multiple
multiple?: boolean;
property onClick
onClick?: MenuClickEventHandler;
property onDeselect
onDeselect?: SelectEventHandler;
property onOpenChange
onOpenChange?: (openKeys: string[]) => void;
property onSelect
onSelect?: SelectEventHandler;
property openKeys
openKeys?: string[];
property overflowedIndicator
overflowedIndicator?: React.ReactNode;
property overflowedIndicatorPopupClassName
overflowedIndicatorPopupClassName?: string;
Internal usage. Do not use in your production.
property prefixCls
prefixCls?: string;
property rootClassName
rootClassName?: string;
property selectable
selectable?: boolean;
property selectedKeys
selectedKeys?: string[];
property subMenuCloseDelay
subMenuCloseDelay?: number;
property subMenuOpenDelay
subMenuOpenDelay?: number;
property triggerSubMenuAction
triggerSubMenuAction?: TriggerSubMenuAction;
interface SubMenuProps
interface SubMenuProps extends Omit<SubMenuType, 'key' | 'children' | 'label'> {}
property children
children?: React.ReactNode;
property eventKey
eventKey?: string;
Internal filled key. Do not set it directly
property internalPopupClose
internalPopupClose?: boolean;
Used for rest popup. Do not use in your prod
property title
title?: React.ReactNode;
property warnKey
warnKey?: boolean;
Do not use. Private warning empty usage
Type Aliases
type MenuRef
type MenuRef = { /** * Focus active child if any, or the first child which is not disabled will be focused. * @param options */ focus: (options?: FocusOptions) => void; list: HTMLUListElement;};
Package Files (8)
Dependencies (6)
Dev Dependencies (22)
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rc-menu
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rc-menu)
- HTML<a href="https://www.jsdocs.io/package/rc-menu"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3672 ms. - Missing or incorrect documentation? Open an issue for this package.