@lineez/smooth-scroll
v1.1.2
Published
Smooth scroll with zero dependencies. Using requestAnimationFrame for better perfomance.
Readme
Simple smooth-scroll that provide a cross-browser scrolling. Firing on wheel and touchmove event. Also provide scroll canceling when user |-_-| interacts with scroll while animation on progress.
Scroll use requestAnimationFrame for better perfomance
Support:
- Offset top and left
- Scroll duration
- May use timing function, like this https://easings.net/#easeInSine
interface Options {
offsetTop: number; // def 0
offsetLeft: number; // def 0
timing: Animate['timing'] // def https://easings.net/#easeInSine
duration: Animate['duration'] // def 2000
}