Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bee-menus

Package Overview
Dependencies
Maintainers
14
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-menus

menus ui component for react

  • 2.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
83
increased by27.69%
Maintainers
14
Weekly downloads
 
Created
Source

bee-menus

npm version Build Status devDependency Status

react bee-menus component for tinper-bee

some description...

使用方法

API

Menu

参数说明类型默认值
className自定义类名string-
theme主题颜色String: light dark-
mode菜单类型,现在支持垂直、水平、和内嵌模式三种String: vertical horizontal inlinevertical
selectedKeys当前选中的菜单项 key 数组Array-
defaultSelectedKeys初始选中的菜单项 key 数组Array-
openKeys当前展开的 SubMenu 菜单项 key 数组Array-
defaultOpenKeys初始展开的 SubMenu 菜单项 key 数组-
onOpenChangeSubMenu 展开/关闭的回调 Function(openKeys: string[])noop
onSelect被选中时调Function({ item, key, selectedKeys })-
onDeselect取消选中时调用,仅在 multiple 生效Function({ item, key, selectedKeys })-
onClick点击 menuitem 调用此函数,参数为 {item, key, keyPath}function-
style根节点样式Object-
keyboard是否使用键盘操作boolfalse
tabIndex设置tabIndexstring0
ChildrenMenuItem组件/SubMenu组件/MenuItemGroup组件node-

Menu.Item

参数说明类型默认值
disabled是否禁用Booleanfalse
keyitem 的唯一标志String-

Menu.SubMenu

参数说明类型默认值
disabled是否禁用Booleanfalse
key唯一标志String
title子菜单项值String or React.Element
children子菜单的菜单项(MenuItem or SubMenu)[]
onTitleClick点击子菜单标题Function({ eventKey, domEvent })
disabled是否禁用Booleanfalse
keyitem 的唯一标志String-
ChildrenMenuItem组件/SubMenu组件/MenuItemGroup组件node-

已支持的键盘操作

注意:目前支持两种写法,参考示例7和示例8

按键功能
↑(上箭)切换选项
↓(下箭)切换选项
←(左箭)关闭下级菜单
→(右箭)打开下级菜单
enter选中
开发调试
$ git clone https://github.com/tinper-bee/bee-menus
$ cd bee-menus
$ npm install
$ npm run dev

Keywords

FAQs

Package last updated on 16 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc