Skip to content

Smooth window scrolling with requestAnimationFrame and the Tween component

Notifications You must be signed in to change notification settings

component/scroll-to

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d7bf3a3 · Mar 19, 2015

History

14 Commits
May 28, 2013
Mar 19, 2015
May 28, 2013
May 28, 2013
Mar 19, 2015
May 28, 2013
Nov 25, 2013
Mar 19, 2015

Repository files navigation

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

About

Smooth window scrolling with requestAnimationFrame and the Tween component

Resources

Stars

Watchers

Forks

Packages

No packages published