@michvh-dev/scroll-behavior
v1.0.3
Published
A utilitie to have different scroll behaviors on your website
Downloads
2
Readme
@michvh-dev: Scroll behavior
This is a component that updates the scroll behavior of the browser, now the only type is scrolling over the content Live demo here.
Table of Contents
General Information
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
Installation
npm
npm i @michvh-dev/scroll-behavior -S
yarn
yarn add @michvh-dev//scroll-behavior
Usage
import ScrollBehavior from '@michvh-dev//scroll-behavior';
const elements= document.querySelectorAll('.section');
new ScrollBehavior({
element: elements,
});
// or
new ScrollBehavior({
elementSelector: '.section',
});