JSPM

rc-menu

2.2.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1825796
  • Score
    100M100P100Q192595F

menu ui component for react

Package Exports

  • rc-menu
  • rc-menu/assets/index.css
  • rc-menu/lib/MenuItem

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-menu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rc-menu


react menu component. port from https://github.com/kissyteam/menu

NPM version build status Test coverage gemnasium deps node version npm download Sauce Test Status

Sauce Test Status

Screenshot

alt

Usage

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);

install

rc-menu

API

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

Development

npm install
npm start

Example

http://localhost:8001/examples/index.md

online example: http://spmjs.io/docs/rc-menu/examples/

Test Case

http://localhost:8000/tests/runner.html?coverage

Coverage

http://localhost:8000/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8000/tests/runner.html?coverage

License

rc-menu is released under the MIT license.