README.md 3.75 KB

rc-drawer


NPM version build status codecov node version npm download

Example

https://rc-drawer.react-component.now.sh

Usage

import Drawer from 'rc-drawer';
import React from 'react';
import ReactDom from 'react-dom';

ReactDom.render(
  <Drawer>
    {menu children}
  </Drawer>
, mountNode);

Install

rc-drawer

Browser Support

IE
Chrome
Firefox
Opera
Safari
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
width string \ number null
height string \ number null
open boolean false open or close menu
defaultOpen boolean false default open menu
handler boolean \ ReactElement true
placement string left left top right bottom
level string \ array all
levelMove number \ array \ func
duration string .3s level animation duration
ease string cubic-bezier(0.78, 0.14, 0.15, 0.86) level animation timing function
getContainer string \ func \ HTMLElement
showMask boolean true mask is show
maskClosable boolean true Clicking on the mask (area outside the Drawer) to close the Drawer or not.
maskStyle CSSProperties null mask style
onChange func null change callback(open)
afterVisibleChange func null transition end callback(open)
onClose func null close click function
onHandleClick func nul handle icon click function
keyboard Boolean true Whether support press esc to close

2.0 Rename onMaskClick -> onClose, add maskClosable.

Development

npm install
npm start