
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
react menu component. port from https://github.com/kissyteam/menu

var Menu = require('rc-menu');
var SubMenu = Menu.SubMenu;
var MenuItem = Menu.Item;
React.render(<Menu>
<MenuItem>1</MenuItem>
<SubMenu title="2">
<MenuItem>2-1</MenuItem>
</SubMenu>
</Menu>, container);
| name | type | default | description |
|---|---|---|---|
| className | String | additional css class of root dom node | |
| activeKey | Object | first active item's key | same with active tabPanel's key |
| activeFirst | Boolean | false | whether active first menu item when show if activeKey is not set |
| multiple | Boolean | false | whether allow multiple select |
| selectedKeys | String[] | [] | selected keys of items |
| onSelect | function(key:String,child:ReactComponent) | called when select a menu item | |
| onDeselect | function(key:String,child:ReactComponent) | called when deselect a menu item | |
| onSelect | Function(key:String) | function called with selected menu item's key as param |
| name | type | default | description |
|---|---|---|---|
| className | String | additional css class of root dom node | |
| disabled | Boolean | false | no effect for click or keydown for this item |
| key | Object | corresponding to activeKey |
| name | type | default | description |
|---|---|---|---|
| className | String | additional css class of root dom node | |
| title | String/ReactElement | sub menu's content | |
| key | Object | corresponding to activeKey | |
| disabled | Boolean | false | no effect for click or keydown for this item |
| openOnHover | Boolean | true | whether show second sub menu on hover |
none
| name | type | default | description |
|---|---|---|---|
| title | String|React.Element | title of item group | |
| children | React.Element[] | MenuItems belonged to this group |
npm install
npm start
http://localhost:8001/examples/index.md
online example: http://react-component.github.io/menu/examples/
http://localhost:8000/tests/runner.html?coverage
rc-menu is released under the MIT license.
FAQs
Did you know?

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.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.