JSPM

  • Created
  • Published
  • Downloads 1795651
  • Score
    100M100P100Q197064F
  • License MIT

drawer ui component for react

Package Exports

  • rc-drawer
  • rc-drawer/assets/index.css

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-drawer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rc-drawer


React Drawer Component

NPM version build status Test coverage gemnasium deps npm download

Screenshots

Development

npm install
npm start

Example

http://localhost:8099/examples/

online example: http://react-component.github.io/drawer/

install

rc-drawer

Usage

var Drawer = require('rc-drawer');
var React = require('react');
React.render(<Drawer />, container);

API

props

Property name Type Default Description
className String '' additional css class of root dom node
prefixCls String 'rci-sidebar' prefix class
children Anything React can render n/a The main content
sidebarStyle object {} Inline styles.
contentStyle object {} Inline styles.
overlayStyle object {} Inline styles.
dragHandleStyle object {} Inline styles.
sidebar Anything React can render n/a The sidebar content
onOpenChange function n/a Callback called when the sidebar wants to change the open prop. Happens after sliding the sidebar and when the overlay is clicked when the sidebar is open.
open boolean false If the sidebar should be open
position string left, enum{'left', 'right', 'top', 'bottom'} where to place the sidebar
docked boolean false If the sidebar should be docked in document
transitions boolean true If transitions should be enabled
touch boolean true If touch gestures should be enabled
dragToggleDistance number 30 Distance the sidebar has to be dragged before it will open/close after it is released.

change from https://github.com/balloob/react-sidebar

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-drawer is released under the MIT license.