# rc-drawer-menu --- [![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url] [![node version][node-image]][node-url] [![npm download][download-image]][download-url] [npm-image]: http://img.shields.io/npm/v/rc-drawer-menu.svg?style=flat-square [npm-url]: http://npmjs.org/package/rc-drawer-menu [travis-image]: https://img.shields.io/travis/react-component/drawer-menu.svg?style=flat-square [travis-url]: https://travis-ci.org/react-component/drawer-menu [coveralls-image]: https://img.shields.io/coveralls/react-component/drawer-menu.svg?style=flat-square [coveralls-url]: https://coveralls.io/r/react-component/drawer-menu?branch=master [node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square [node-url]: http://nodejs.org/download/ [download-image]: https://img.shields.io/npm/dm/rc-drawer-menu.svg?style=flat-square [download-url]: https://npmjs.org/package/rc-drawer-menu ## Example http://react-component.github.io/drawer-menu/examples/ ## Usage ```js import Drawer from 'rc-drawer-menu'; import React from 'react'; import ReactDom from 'react-dom'; ReactDom.render( {menu children} , mountNode); ``` ## Install [![rc-drawer-menu](https://nodei.co/npm/rc-drawer-menu.png)](https://npmjs.org/package/rc-drawer-menu) ## Browser Support |![IE](https://github.com/alrra/browser-logos/blob/master/src/edge/edge_48x48.png?raw=true) | ![Chrome](https://github.com/alrra/browser-logos/blob/master/src/chrome/chrome_48x48.png?raw=true) | ![Firefox](https://github.com/alrra/browser-logos/blob/master/src/firefox/firefox_48x48.png?raw=true) | ![Opera](https://github.com/alrra/browser-logos/blob/master/src/opera/opera_48x48.png?raw=true) | ![Safari](https://github.com/alrra/browser-logos/blob/master/src/safari/safari_48x48.png?raw=true)| | --- | --- | --- | --- | --- | | IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ | ## API | props | type | default | description | |------------|----------------|---------|----------------| | className | string | null | - | | prefixCls | string | 'drawer' | prefix class | | wrapperClassName | string | null | wrapper class name | | open | boolean | false | open or close menu | | defaultOpen | boolean | false | default open menu | | handleChild | boolean / ReactElement | true | true or false or ReactElement | | handleStyle | object | null | handle style | | placement | string | `left` | `left` `top` `right` `bottom` | | level | string or array | `all` | With the drawer level element. `all`/ null / className / id / tagName / array | | levelTransition | string | `transform .3s cubic-bezier(0.78, 0.14, 0.15, 0.86)` | level css transition | | getContainer | string | `body` | Return the mount node for Drawer. if is `null` use React.creactElement | | showMask | boolean | true | mask is show | | maskStyle | object | null | mask style | | onChange | func | null | change callback(open) | | onMaskClick | func | null | mask close click function | | onHandleClick | func | nul | handle icon click function | > 1.0 remove `openClassName` `width`, update `iconChild` -> `handleChild` `onIconClick` -> `onHandleClick` `parent` -> `getContainer`, add `handleStyle` `showMask`. ## Development ``` npm install npm start ```