# rmc-drawer

> drawer ui component for react

Latest version **0.4.11** (published 2018-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install rmc-drawer
pnpm add rmc-drawer
yarn add rmc-drawer
bun add rmc-drawer
```

## Health

**Score 28/100 (F)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.11 |
| Published | 2018-05-11 |
| First published | 2018-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/rmc-drawer) |
| Module format | ESM + CommonJS |
| Node | >=4.0.0 |
| Dependencies | 3 |
| Unpacked size | 42.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 53 |
| Maintainers | warmhug |
| Keywords | react, react-component, react-drawer, drawer |

## Links

- npm: https://www.npmjs.com/package/rmc-drawer
- Repository: https://github.com/react-component/m-drawer
- Issues: https://github.com/react-component/m-drawer/issues
- npm.io page: https://npm.io/package/rmc-drawer

## Dependencies (3)

- [classnames](https://npm.io/package/classnames.md) ^2.2.4
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10
- [babel-runtime](https://npm.io/package/babel-runtime.md) 6.x

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.4.11 (latest) — 2018-05-11

## README

# rmc-drawer
---

React Drawer Component


[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![gemnasium deps][gemnasium-image]][gemnasium-url]
[![npm download][download-image]][download-url]

[npm-image]: http://img.shields.io/npm/v/rmc-drawer.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rmc-drawer
[travis-image]: https://img.shields.io/travis/react-component/m-drawer.svg?style=flat-square
[travis-url]: https://travis-ci.org/react-component/m-drawer
[coveralls-image]: https://img.shields.io/coveralls/react-component/m-drawer.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/react-component/m-drawer?branch=master
[gemnasium-image]: http://img.shields.io/gemnasium/react-component/m-drawer.svg?style=flat-square
[gemnasium-url]: https://gemnasium.com/react-component/m-drawer
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/rmc-drawer.svg?style=flat-square
[download-url]: https://npmjs.org/package/rmc-drawer


## Screenshots

<img src="https://os.alipayobjects.com/rmsportal/gqhazYYGIaUmunx.png" width="288"/>


## Development

```
npm install
npm start
```

## Example

http://localhost:8099/examples/


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


## install


[![rmc-drawer](https://nodei.co/npm/rmc-drawer.png)](https://npmjs.org/package/rmc-drawer)


## Usage

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

## API

### props

| Property name | Description | Type | Default |
|---------------|-------------|------|---------|
| className | additional css class of root dom node | String | '' |
| prefixCls | prefix class | String | 'rmc-drawer' |
| children | The main content | any | n/a |
| style | container styles. | Object |  |
| sidebarStyle | Inline styles. | Object | {} |
| contentStyle | Inline styles. | Object | {} |
| overlayStyle | Inline styles. | Object | {} |
| dragHandleStyle | Inline styles. | Object | {} |
| sidebar | The sidebar content | any | n/a |
| onOpenChange | 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. | Function | n/a |
| open | If the sidebar should be open | Boolean | false |
| position | where to place the sidebar | String | 'left', enum{'left', 'right', 'top', 'bottom'} |
| docked | If the sidebar should be docked in document | Boolean | false |
| transitions | If transitions should be enabled | Boolean | true |
| touch | If touch gestures should be enabled | Boolean | true |
| enableDragHandle | If dragHandle should be enabled | Boolean | true |
| dragToggleDistance | Distance the sidebar has to be dragged before it will open/close after it is released. | Number | 30 |

> change from [https://github.com/balloob/react-sidebar](https://github.com/balloob/react-sidebar)


## Test Case

```
npm test
npm run chrome-test
```

## Coverage

```
npm run coverage
```

open coverage/ dir

## License

rmc-drawer is released under the MIT license.

---
_Source: https://npm.io/package/rmc-drawer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
