Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.
actanoPublic archive

About

Smooth window scrolling with requestAnimationFrame and the Tween component

Resources

Stars

0 stars

Watchers

5 watching

Forks

 
 

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

scroll-to

Smooth window scroll to position within an element with requestAnimationFrame and Tween.

Installation

$ component install actano/scroll-view

API

ScrollView (element)

Binds ScrollView on element

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

0 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages