Easy To Use For Adding CSS Animation To Scrolling Elements | Scrollrisen

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-srdescription
fadesimple fade animation
fade-lfade from left
fade-rfade from right
fade-tfade from top
fade-bfade from bottom
fade-t-lfade from top left
fade-t-rfade from top right
fade-b-lfade from bottom left
fade-b-lfade from bottom left
fade-b-rfade from bottom right

Flip

data-srdescription
flip-lflip from left
flip-rflip from right
flip-tflip from top
flip-bflip from bottom

Zoom

data-srdescription
zoomcenter zoom
zoom-lzoom from left
zoom-rzoom from right
zoom-tzoom from top
zoom-bzoom 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.

Related Posts

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

jquery-cookie-consent

Simple jQuery Cookie Consent Plugin

jquery.cookie-consent is a simple jQuery plugin to request consent to use cookies. An easy-to-use and highly customizable cookie consent bar that informs your visitors of the use…

Timepicker-Plugin-for-jQuery

Timepicker JavaScript Plugin for jQuery Inspired by Google Calendar

jquery.timepicker is a lightweight jQuery timer plugin inspired by Google Calendar. It supports both mouse and keyboard navigation and weighs 5.5KB minified and compact. Features: Highly customizable…

angular-ngx-carousel-slider

A Lightweight, Touchable, and Responsive Angular Universal Carousel Library

ngxCarousel is a lightweight, tactile, and responsive library for creating an angular carousel. No dependencies, no more hammer. Must Read: Angular Responsive Image Slider With Lightbox Popup…

vue-fullpage-modal

First Mobile Full-screen Modal Popup Library For Vue

Vue full-page modal is a responsive, mobile-compatible, screen-friendly pop-up library for Vue.js. Must Read: Modal Component Is Written in Vanilla JS | ensemble Modal How to make…

random-number-picker

Generate a Random Number Picker In Vanilla JavaScript

Random Number Picker is a Vanilla JS-based number picker that allows you to generate a random number within a specified range. Must Read: Generating Lottery Numbers Using…