react-mobile-drawer
Simple react drawer component with touch events support
Example: https://ilyacuc.github.io/react-mobile-drawer/
Usage
;;; PureComponent { superprops; thisstate = isOpen: false } { this;} { this;} { return <div> <Drawer isOpen=thisstateisOpen closeDrawer=thiscloseDrawer openDrawer=thisopenDrawer> <div>Menu content here</div> </Drawer> <button onClick=thisopenDrawer>Open Drawer</button> <div>Main content here</div> </div> ;} ReactDOM;
Props
Prop Name | Default Value | Description |
---|---|---|
isOpen | false | controls state of drawer |
backdropClassName | empty string | class name to style backdrop |
drawerClassName | empty string | class name to style drawer container |
width | 80 | drawer width in % |
sideZoneWidth | 30 | width of side drawing zone in px |
closeDrawer | empty function | function to control state of drawer |
openDrawer | empty function | function to control state of drawer |