This is a component that updates the scroll behavior of the browser, now the only type is scrolling over the content Live demo here.
This component gives you a new scroll behavior that gives a cleaner and beautifull scroll behavior
- It supports the mobile velocity autoscroll
- It supports the keyboard events
npm i @michvh-dev/scroll-behavior -S
yarn add @michvh-dev//scroll-behavior
import ScrollBehavior from '@michvh-dev//scroll-behavior';
const elements= document.querySelectorAll('.section');
new ScrollBehavior({
element: elements,
});
// or
new ScrollBehavior({
elementSelector: '.section',
});