React Touch Bottom Drawer with native touch (react-touch-drawer)
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:
; const drawerHeight=200 { return <ReactTouchDrawer heightSet=drawerHeight drawerComponent= <div style=backgroundColor: "blue"height:drawerHeight+'px'>hello</div> > <div className="" style=background:'red'height:'110vh'> <div onClick=open>open</div> <div onClick=close>close</div> </div> </ReactTouchDrawer> };
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%" |
enabled | true | bool (Stop touch gesture) |