rc-menu

  • Version 9.0.14
  • Published
  • 209 kB
  • 7 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 useFullPath

    const useFullPath: (eventKey?: string) => string[];
    • Only used for antd internal. Do not use in your production.

    Functions

    function Divider

    Divider: ({ className, style }: DividerProps) => any;

      function Item

      Item: (props: MenuItemProps) => any;

        function ItemGroup

        ItemGroup: ({ children, ...props }: MenuItemGroupProps) => any;
          MenuItem: (props: MenuItemProps) => any;
            MenuItemGroup: ({ children, ...props }: MenuItemGroupProps) => any;
              SubMenu: (props: SubMenuProps) => any;

                Interfaces

                interface MenuItemGroupProps {}
                  children?: React.ReactNode;
                    className?: string;
                      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<
                        React.HTMLAttributes<HTMLLIElement>,
                        'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onSelect'
                        > {}
                          attribute?: Record<string, string>;
                          • Deprecated

                            No place to use this. Should remove

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

                              itemIcon?: RenderIconType;
                                onClick?: MenuClickEventHandler;
                                  onMouseEnter?: MenuHoverEventHandler;
                                    onMouseLeave?: MenuHoverEventHandler;
                                      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;
                                              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;
                                                                  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;
                                                                                    selectable?: boolean;
                                                                                      selectedKeys?: string[];
                                                                                        subMenuCloseDelay?: number;
                                                                                          subMenuOpenDelay?: number;
                                                                                            triggerSubMenuAction?: TriggerSubMenuAction;
                                                                                              interface SubMenuProps {}
                                                                                                children?: React.ReactNode;
                                                                                                  className?: string;
                                                                                                    disabled?: boolean;
                                                                                                      eventKey?: string;
                                                                                                      • Internal filled key. Do not set it directly

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

                                                                                                        itemIcon?: RenderIconType;
                                                                                                          onClick?: MenuClickEventHandler;
                                                                                                            onMouseEnter?: MenuHoverEventHandler;
                                                                                                              onMouseLeave?: MenuHoverEventHandler;
                                                                                                                onTitleClick?: (info: MenuTitleInfo) => void;
                                                                                                                  onTitleMouseEnter?: MenuHoverEventHandler;
                                                                                                                    onTitleMouseLeave?: MenuHoverEventHandler;
                                                                                                                      popupClassName?: string;
                                                                                                                        popupOffset?: number[];
                                                                                                                          style?: React.CSSProperties;
                                                                                                                            title?: React.ReactNode;
                                                                                                                              warnKey?: boolean;
                                                                                                                              • Do not use. Private warning empty usage

                                                                                                                              Package Files (6)

                                                                                                                              Dependencies (7)

                                                                                                                              Dev Dependencies (20)

                                                                                                                              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>