0.0.3 • Published 7 years ago
@robinnnnn/scroll-to v0.0.3
scroll-to
Smooth window scroll to position with requestAnimationFrame and Tween.
Installation
$ npm install @robinnnnn/scroll-toAPI
scrollTo(x, y, options)
Scroll to the given point (x, y) with the given options:
easeeasing function defaulting to "out-circ" (view ease for more)durationanimation duration defaulting to1000millisecondscancelOnUserScrollcancels scrolling animation when user interruption is detected; defaults tofalse
var scrollTo = require('scroll-to');
scrollTo(500, 1200, {
ease: 'out-bounce',
duration: 1500,
cancelOnUserScroll: true
});License
MIT
0.0.3
7 years ago