Press "Enter" to skip to content

Create Smooth & Beautiful Animations When You Scroll | lax.js

lax.js is a simple and lightweight (less than 4kb gzipped) JavaScript library for creating smooth, beautiful scrolling animations. This Js library provides 18+ cool element animations when scrolling down and up.

All possible animations.

  • fadeIn
  • fadeOut
  • fadeInOut
  • scaleIn
  • scaleOut
  • scaleInOut
  • slideX
  • slideY
  • jiggle
  • seesaw
  • zigzag
  • hueRotate
  • spin
  • flipX
  • flipY
  • blurIn
  • blurOur
  • blurInOut

How to make use of it:

Install and import the lax.js.

# Yarn
$ yarn add lax.js

# NPM
$ npm i lax.js --save
import lax from 'lax.js'

Or instantly link to the primary JavaScript file within the doc.

window.onload = function() {
  lax.init()
  // Add a driver that we use to control our animations
  lax.addDriver('scrollY', function() {
    return document.body.scrollTop
  })
  // Add animation bindings to elements
  lax.addElements('.selector', {
    scrollY: {
      translateX: [
        ["elInY", "elCenterY", "elOutY"],
        [0, 'screenWidth/2', 'screenWidth'],
      ]
    }
  }
})

Apply a number of animations to a component utilizing the data_lax_preset attribute. All attainable animations.

<div class="lax lax_preset_fadeIn-50-100 lax_preset_spin">
  Laxxx Example
</div>

Awesome Scroll Effects In JavaScript, lax js Plugin/Github

Read More  Regular JavaScript Version of jQuery slideToggle(), slideDown(), and slideUp() | dom-slider

See Demo And Download

Official Website(alexfoxy): Click Here

This superior jQuery/javascript plugin is developed by alexfoxy. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *