# react-touch-drawer

> react-touch-drawer

Latest version **1.1.2** (published 2020-05-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-touch-drawer
pnpm add react-touch-drawer
yarn add react-touch-drawer
bun add react-touch-drawer
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2020-05-29 |
| First published | 2020-05-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | pldhiman |
| Maintainers | pldhiman |

## Links

- npm: https://www.npmjs.com/package/react-touch-drawer
- npm.io page: https://npm.io/package/react-touch-drawer

## Dependencies (5)

- [react](https://npm.io/package/react.md) ^16.13.1
- [react-dom](https://npm.io/package/react-dom.md) ^16.13.1
- [react-spring](https://npm.io/package/react-spring.md) ^9.0.0-rc.1
- [react-use-gesture](https://npm.io/package/react-use-gesture.md) ^7.0.15
- [@babel/plugin-transform-async-to-generator](https://npm.io/package/@babel/plugin-transform-async-to-generator.md) ^7.8.3

## Recent versions

- 1.1.2 (latest) — 2020-05-29
- 1.1.1 — 2020-05-29
- 1.1.0 — 2020-05-29
- 1.0.9 — 2020-05-28
- 1.0.8 — 2020-05-07
- 1.0.7 — 2020-05-07
- 1.0.6 — 2020-05-07
- 1.0.5 — 2020-05-06
- 1.0.4 — 2020-05-06
- 1.0.3 — 2020-05-06
- 1.0.2 — 2020-05-06
- 1.0.1 — 2020-05-06
- 1.0.0 — 2020-05-06

## README

# React Touch Bottom Drawer with native touch (react-touch-drawer)

![](https://image.prepladder.com/catalogue/ezgif.com-video-to-gif.gif) 


###Installation and usage

####Inline code
The easiest way to use react-touch-drawer is to install it from npm and build it into your app with Webpack.

`$ npm install react-touch-drawer`

####Then use it in your app:

```javascript
import ReactTouchDrawer from 'react-touch-drawer';

const drawerHeight=200
function App() {
    return (  
            <ReactTouchDrawer 
                heightSet={drawerHeight} 
                drawerComponent={
                   ({close,open})=>( <div style={{backgroundColor: "blue",height:drawerHeight+'px'}}>hello</div>)
                }
            >
                {
                    ({close,open})=>(
                        <div className="" style={{background:'red',height:'110vh'}}>
                            <div onClick={open}>open</div>
                            <div onClick={close}>close</div>
                        </div>
                    )
                }
               
            </ReactTouchDrawer>
    )
  }
export default App;
```
               
###Props
                    
Name              |  Props          | value
-------------     | ------------    | ---------
heightSet         | 300 (default)   | number
drawerComponent   | component       | react componnet
bodyAnimation     | false           | bool
drawerBG          | rgba(0,0,0,.2) (default) | color(hex,rgba)
drawerContainerBg | white (default) | color(hex,rgba)
drawerWidth       | string          | "80%" || "100vh" || "100px"
enabled           | true            | bool (Stop touch gesture)




### MADE WITH LOVE

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