A tiny JavaScript library to enable CSS animations when user scrolls.
This library toggles a class to an element when it appears on viewport when user scrolls. It lets you build CSS transitions or animations launched only when user scrolls on it. Only set a few HTML attributes, and code the rest with your CSS skills.
Note that in order to not be JavaScript dependant, this library add the class when the element is outside of the viewport. This way, if you have a JS error, it's the default state that will appears on scroll.
Several quick start options are available:
- Direct download
- Choose another version: ES5 or ES6
- Install with npm:
npm install onscroll-effect
onScroll Effect's full documentation is hosted on GitHub Pages at twikito.github.io/onscroll-effect/.
- Clone the repo:
git clone https://github.com/twikito/onscroll-effect.git
- Development:
npm run build
- Fork repository on GitHub
- Report a bug
- Suggest a feature
MIT. Copyright (c) Matthieu Bué