Smooth Scroll With Inertia Support – scrooth

Category: Animation , Javascript | November 6, 2018
Views Total:1,057 views
Official Page:Go to website
Last Update:November 6, 2018


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



  • JS refactor

You Might Be Interested In:

Leave a Reply