Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

scroll-to

0.0.2 • Public • Published

scroll-to

Smooth window scroll to position with requestAnimationFrame and Tween.

Installation

$ component install component/scroll-to

API

scrollTo(x, y, [options])

Scroll to the given point (x, y) with the given options:

  • ease easing function defaulting to "out-circ" (view ease for more)
  • duration animation duration defaulting to 1000
var scrollTo = require('scroll-to');
 
scrollTo(500, 1200, {
  ease: 'out-bounce',
  duration: 1500
});

License

MIT

install

npm i scroll-to

Downloadsweekly downloads

21,389

version

0.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability