Giter VIP home page Giter VIP logo

drawer's Introduction

rc-drawer


NPM version build status codecov node version npm download

Example

http://react-component.github.io/drawer/examples/

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
open boolean false open or close menu
defaultOpen boolean false default open menu
handler boolean | ReactElement true true or false or ReactElement, default: <divclassName="drawer-handle"><i className="drawer-handle-icon" /></div>;
placement string left left top right bottom
level string | array all With the drawer level element. all/ null / className / id / tagName / array
levelMove number | array | func null level move value. default is drawer width
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 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.5 Rename handleChild -> handler, remove handleStyle, remove levelTransition -> duration ease, add levelMove.

Development

npm install
npm start

drawer's People

Contributors

jljsj33 avatar chenshuai2144 avatar olragon avatar yesmeck avatar afc163 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.