This vanila JS smoothscroll
module can be used instead of scroll-behavior: smooth
css which is unsupported across browsers.
Use case is similar to using this jQuery:
$('html,body').animate({
scrollTop: offset
}, 1000);
Install the demo using
npm install
Build for development
npm run dev
Or production
npm run build