bespoke-dir
v0.1.0
Published
Add a class to the slide parent element to let you know which direction the slides are going
Downloads
12
Readme
bespoke-dir
Add a class to the slide parent element to let you know which direction the slides are going.
The bespoke parent element will initialise with bespoke-dir-next
whenever you change slide it will update which direction you're going so you can do more advanced animations.
Download
Download the production version or the development version, or use a package manager.
Usage
This plugin is shipped in a UMD format, meaning that it is available as a CommonJS/AMD module or browser global.
For example, when using CommonJS modules:
var bespoke = require('bespoke'),
dir = require('bespoke-dir');
bespoke.from('article', [
dir()
]);
When using browser globals:
bespoke.from('article', [
bespoke.plugins.dir()
]);
You can now change the style of the animation depending on which direction you're going.
CSS
The following classes are available on your parent element.
See demo folder for a very simple example.
Package managers
npm
$ npm install bespoke-dir
Bower
$ bower install bespoke-dir
Credits
This plugin was built with generator-bespokeplugin.