1.2.1 • Published 8 years ago
chialab-sidenav v1.2.1
SideNav
A mobile friendly sidenav implementation.
Install
$ npm i chialab-sidenav --save
$ bower i chialab-sidenav --save
Example
var element = document.getElementById('#sidenav');
var sidenav = new SideNav(element);
sidenav.options = { ... };
Configuration
You can pass the following options to the constructor:
- class: the scope class for the element (default:
'sidenav'
); - position: place the sidenav on the left or on the right of the page (default:
'left'
); - open: the sidenav initial state (default:
true
); - swipe: listen swipe gesture on touch devices (default:
true
) - swipeSensibility: the range of valid pixels for swiping (default:
50
)