rc-drawer-menu-fix
v0.5.3
Published
drawer menu animation component for react
Downloads
6
Maintainers
Readme
rc-drawer-menu
Example
http://ant-motion.github.io/drawer-menu/examples/
Usage
import Drawer from 'rc-drawer-menu';
import React from 'react';
import ReactDom from 'react-dom';
ReactDom.render(
<Drawer>
{menu children}
</Drawer>
, mountNode);
Install
Browser Support
| | | | | | | --- | --- | --- | --- | --- | | IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
API
| 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
/ null / 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. if is null
use React.creactElement |
| onChange | func | null | change callback(open) |
| onMaskClick | func | null | mask close click function |
| onIconClick | func | nul | icon click function |
0.5 onSwitch split into
onMaskClick
onIconClick
;
Development
npm install
npm start