react-overlay-menu
An overlay side menu React component using CSS transitions.
install
yarn add react-overlay-menu -S | npm install react-overlay-menu -S
usage
;;;{superprops;thisstate = isOpen: false ;thistoggleMenu = thistoggleMenu;}{this;}{return<div><button type="button" onClick=thistoggleMenu>Open menu</button><OverlayMenuopen=thisstateisOpenonClose=thistoggleMenu><MyMenu /></OverlayMenu></div>;};
options
Prop | Type | Default | Description |
---|---|---|---|
open |
bool |
false | Is the menu opened or not. |
right |
bool |
false | Fix the overlay menu to the right. |
onClose |
func |
undefined | Callback function to close, when click on the overlay. |