http://ant-motion.github.io/drawer-menu/examples/
import Drawer from 'rc-drawer-menu';
import React from 'react';
import ReactDom from 'react-dom';
ReactDom.render(
<Drawer>
{menu children}
</Drawer>
, mountNode);
IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
props | type | default | description |
---|---|---|---|
className | string | drawer |
- |
openClassName | string | drawer-open |
open className |
wrapperClassName | string | null | wrapper class name |
iconChild | boolean / ReactElement / Array | true | true or false or ReactElement or Array(ReactElement, ReactElement) => [ close, open ] |
open | boolean | false | open or close menu |
defaultOpen | boolean | false | default open menu |
width | string | 60vw |
children width |
placement | string | left |
left or right |
level | string or array | all |
With the drawer level element. all / className / id / tagName / array |
levelTransition | string | transform .3s cubic-bezier(0.78, 0.14, 0.15, 0.86) |
level css transition |
parent | string | body |
parent element. |
onChange | function | null | change callback(open) |
onIconClick | function | null | icon click function |
npm install
npm start