Smooth Scroll With Inertia Support – scrooth

Category: Animation , Javascript | January 25, 2021
Author: shererere
Views Total: 719 views
Official Page: Go to website
Last Update: January 25, 2021
License: MIT


Smooth Scroll With Inertia Support – scrooth


scrooth is a small JavaScript library that adds a configurable, momentum style smooth scroll effect to the native page scroll.

How to use it:

Import the scrooth library into your document and done.

<script src="scrooth.js"></script>

By default, scrooth will automatically enable the smooth scroll effect on the whole body:

const body = new Scrooth();

You can also initialize the scrooth on any scrollable element you prefer.

const scroll = new Scrooth({
      element: window // target element

Config the smooth scroll with the following parameters.

const scroll = new Scrooth({
      strength: 10,
      acceleration: 1.2,
      deceleration: 0.975



  • Prevent flickering


  • JS refactor

You Might Be Interested In:

Leave a Reply