sioux-offscreen

An off screen navigation item. Similar to the menu of the Facebook and Path app

sioux offscreen

npm install sioux-offscreen

An off screen navigation item. Similar to the menu of the Facebook and Path app. __demo__. It requires two part: an offscreen elem which is hidden behind the other onscreen element.

var Offscreen = require('sioux-offscreen');
 
var off = new Offscreen(offscreenElement, onscreenElement);
 
off.toggle(function () {
  console.log('Toggled!');
});
  • offscreen: the off screen DOM element
  • onscreen: the forward DOM element
  • hidden: Boolean, whether the offscreen element is hidden or not
  • __show(callback)__: shows the offscreen element, the callback gets called when the animation ended
  • __hide(callback)__: hides the offscreen element, the callback gets called when the animation ended
  • __toggle(callback)__: toggles the state, the callback gets called when the animation ended