Scrollrisen is to trigger the css scrolling animation while items enter the viewport. Zero dependencies, lightweight, easy to use, and customizable.
AOS (Animate On Scroll) JavaScript library that plays, flips or zooms in CSS3-enabled animations on objects while scrolling to view.
NOTE You can extend or create custom list of animations if this isn’t enough for your use case by either modifying scrollrisen.css or adding styles to your custom css file.
scroll triggered animations, animate on scroll, animate content on scroll, animate div on scroll jquery, wow animation on scroll up and down, aos animation codepen
List of possible animations
Fade
data-sr | description |
---|---|
fade | simple fade animation |
fade-l | fade from left |
fade-r | fade from right |
fade-t | fade from top |
fade-b | fade from bottom |
fade-t-l | fade from top left |
fade-t-r | fade from top right |
fade-b-l | fade from bottom left |
fade-b-l | fade from bottom left |
fade-b-r | fade from bottom right |
Flip
data-sr | description |
---|---|
flip-l | flip from left |
flip-r | flip from right |
flip-t | flip from top |
flip-b | flip from bottom |
Zoom
data-sr | description |
---|---|
zoom | center zoom |
zoom-l | zoom from left |
zoom-r | zoom from right |
zoom-t | zoom from top |
zoom-b | zoom from bottom |
How to make use of it:
1. Install and import the Scrollrisen.
# Yarn $ yarn add scroll-risen # NPM $ npm i scroll-risen
import scrollrisen from 'scroll-risen/dist/scrollrisen.js' import 'scroll-risen/dist/scrollrisen.css'
2. Or straight import the next information into the doc.
<link rel="stylesheet" href="dist/css/scrollrisen.css" /> <script src="dist/js/scrollrisen.js"></script>
3. Initialize the Scrollrisen and we’re able to go.
scrollrisen.init({ // options here });
4. Apply an animation to your factor utilizing the data-sr
attribute.
<div class="box" data-sr="fade-l">Fade</div> <div class="box" data-sr="flip-r">Flip</div> <div class="box" data-sr="zoom">Zoom</div>
5. Default configurations.
scrollrisen.init({ /** * easing function */ easing: 'ease', /** * animation duration in ms */ duration: 2000, /** * animation trigger point(where is the top of the element relative to viewport), 0,5 means center */ trigger: 0.2, /** * should animation go in reverse when element is below the viewport */ reverse: true, /** * how often should scroll handler be called in ms */ debounce: 16, /** * active class applied to elements in viewport */ activeClass: '_sr-active' });
Trigger Fade/Flip/Zoom Animations On Scroll, Scrollrisen Plugin/Github, animate on scroll not working, css animations on scroll slide in from left
See Demo And Download
Official Website(bojan30): Click Here
This superior jQuery/javascript plugin is developed by bojan30. For extra Advanced Usages, please go to the official website.