scrollto-animation
v1.0.2
Published
simple package which enable scroll to particular position with animation.You can control duration also by providing time
Downloads
4
Maintainers
Readme
Install
npm i scrollto-animation --save
Usage
import scrollTo from "scrollto-animation"
scrollTo (Target,duration,animationStyle,callback);
Target : element where to scroll duration: duration of animation in milli seconds animationStyle: animation style one of the below callback: its optional function you want to execute after animation complete.
linear
easeInQuad
easeOutQuad
easeInOutQuad
easeInCubic
easeOutCubic
easeInOutCubic
easeInQuart
easeOutQuart
easeInOutQuart
easeInQuint
easeOutQuint
easeInOutQuint
scrollTo(document.getElementById("id"),300,"easeOutQuad");