apex-animate
v1.0.4
Published
Trigger animations with a simple data-attribute.
Downloads
14
Maintainers
Readme
Apex Animate
Trigger high-performance animations with a simple data-attribute
Installation
Install from npm
$ npm install apex-animate
Usage
Import/require apex-animate in your file.
import apexAnimate from 'apex-animate'
// or
const apexAnimate = require('apex-animate')
Use the data-attributes on HTML elements.
<!-- Fade in animation -->
<div data-apex-animate="fade-in"></div>
<!-- Parallax animation -->
<div data-apex-animate="parallax"></div>
Optional: tweak options for the duration and delay (both in seconds).
<!-- Fade in to top with extra options -->
<div data-apex-animate="fade-to-top" data-apex-animate-duration="2" data-apex-animate-delay=".2"></div>
The following animations are currently available:
'fade-to-top'
'fade-to-right'
'fade-to-bottom'
'fade-to-left'
'fade-in'
'parallax'
License
This project is available under the MIT license.