JavaScript Library For Smooth Scrolling With Easing – smooth-scroll.js

Category: Animation , Javascript | June 12, 2021
Author: bhagabati-prasad
Views Total: 115 views
Official Page: Go to website
Last Update: June 12, 2021
License: MIT

Preview:

JavaScript Library For Smooth Scrolling With Easing – smooth-scroll.js

Description:

An advanced smooth scroll JavaScript library that makes it possible to smoothly scroll the page to a specified point within the document, with configurable duration and optional easing effects.

How to use it:

1. Download and import the smooth-scroll.js JavaScript library.

<script src="./smooth-scroll.js"></script>

2. Scroll the page to a specific element.

smoothScroll('.section');

3. Config the duration of the animation.

smoothScroll('.section', 1000);

4. Apply an easing effect:

  • easeInOutCirc
  • linearTween
  • easeInQuad
  • easeOutQuad
  • easeInCubic
  • easeInOutQuad (Default)
smoothScroll('.section', 1000, 'easeInOutCirc');

You Might Be Interested In:


Leave a Reply