Native Smooth Scroll Polyfill – smoothscroll.js

Category: Animation , Javascript , Recommended | December 2, 2019
Views Total:5,609 views
Official Page:Go to website
Last Update:December 2, 2019


Native Smooth Scroll Polyfill – smoothscroll.js


smoothscroll.js is a lightweight, configurable, Vanilla JavaScript polyfill for native smooth scroll using CSS scroll-behavior: smooth property.

Use this polyfill to implement the smooth scroll to functionality on those browsers that don’t’ support the native smooth scroll behavior: MS Edge, Internet Explorer, and Safari.

How to use it:

1. Install the smooth scroll polyfill.

# Yarn
$ yarn add smoothscroll-polyfill
$ npm install smoothscroll-polyfill --save

2. Import the smoothscroll module.

import smoothscroll from 'smoothscroll-polyfill';

3. Call the smoothscroll polyfill and done.


4. Scroll the webpage using the following native JS API.

You Might Be Interested In:

Leave a Reply