rc-menu

  • Version 9.16.0
  • 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

variable ExportMenu

const ExportMenu: any;

    variable Item

    const Item: React.ForwardRefExoticComponent<any>;

      variable ItemGroup

      const ItemGroup: React.ForwardRefExoticComponent<any>;
        const MenuItem: React.ForwardRefExoticComponent<any>;
          const MenuItemGroup: React.ForwardRefExoticComponent<any>;
            const SubMenu: React.ForwardRefExoticComponent<any>;

              Functions

              function Divider

              Divider: ({ className, style }: DividerProps) => React.JSX.Element;

                function useFullPath

                useFullPath: (eventKey?: string) => string[];

                  Interfaces

                  interface MenuItemGroupProps
                  extends Omit<MenuItemGroupType, 'type' | 'children' | 'label'> {}
                    children?: React.ReactNode;
                      eventKey?: string;
                      • Internal filled key. Do not set it directly

                      title?: React.ReactNode;
                        warnKey?: boolean;
                        • Do not use. Private warning empty usage

                        interface MenuItemProps
                        extends Omit<MenuItemType, 'label' | 'key' | 'ref'>,
                        Omit<
                        React.HTMLAttributes<HTMLLIElement>,
                        'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onSelect'
                        > {}
                          attribute?: Record<string, string>;
                          • Deprecated

                            No place to use this. Should remove

                          children?: React.ReactNode;
                            eventKey?: string;
                            • Internal filled key. Do not set it directly

                            warnKey?: boolean;
                            • Do not use. Private warning empty usage

                            interface MenuProps
                            extends Omit<
                            React.HTMLAttributes<HTMLUListElement>,
                            'onClick' | 'onSelect' | 'dir'
                            > {}
                              activeKey?: string;
                                builtinPlacements?: BuiltinPlacements;
                                  children?: React.ReactNode;
                                  • Deprecated

                                    Please use items instead

                                  defaultActiveFirst?: boolean;
                                    defaultMotions?: Partial<{
                                    [key in MenuMode | 'other']: CSSMotionProps;
                                    }>;
                                    • Default menu motion of each mode

                                    defaultOpenKeys?: string[];
                                      defaultSelectedKeys?: string[];
                                        direction?: 'ltr' | 'rtl';
                                        • direction of menu

                                        disabled?: boolean;
                                          disabledOverflow?: boolean;
                                          • Disable auto overflow. Pls note the prop name may refactor since we do not final decided.

                                          expandIcon?: RenderIconType;
                                            forceSubMenuRender?: boolean;
                                              getPopupContainer?: (node: HTMLElement) => HTMLElement;
                                                inlineCollapsed?: boolean;
                                                  inlineIndent?: number;
                                                    itemIcon?: RenderIconType;
                                                      items?: ItemType[];
                                                        mode?: MenuMode;
                                                          motion?: CSSMotionProps;
                                                          • Menu motion define. Use defaultMotions if you need config motion of each mode

                                                          multiple?: boolean;
                                                            onClick?: MenuClickEventHandler;
                                                              onDeselect?: SelectEventHandler;
                                                                onOpenChange?: (openKeys: string[]) => void;
                                                                  onSelect?: SelectEventHandler;
                                                                    openKeys?: string[];
                                                                      overflowedIndicator?: React.ReactNode;
                                                                        overflowedIndicatorPopupClassName?: string;
                                                                        • Internal usage. Do not use in your production.

                                                                        prefixCls?: string;
                                                                          rootClassName?: string;
                                                                            selectable?: boolean;
                                                                              selectedKeys?: string[];
                                                                                subMenuCloseDelay?: number;
                                                                                  subMenuOpenDelay?: number;
                                                                                    triggerSubMenuAction?: TriggerSubMenuAction;
                                                                                      interface SubMenuProps extends Omit<SubMenuType, 'key' | 'children' | 'label'> {}
                                                                                        children?: React.ReactNode;
                                                                                          eventKey?: string;
                                                                                          • Internal filled key. Do not set it directly

                                                                                          internalPopupClose?: boolean;
                                                                                          • Used for rest popup. Do not use in your prod

                                                                                          title?: React.ReactNode;
                                                                                            warnKey?: boolean;
                                                                                            • Do not use. Private warning empty usage

                                                                                            Type Aliases

                                                                                            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 (25)

                                                                                              Peer Dependencies (2)

                                                                                              Badge

                                                                                              To add a badge like this onejsDocs.io badgeto 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>