1.0.0 • Published 5 years ago

animate-scroll-to v1.0.0

Weekly downloads
103
License
MIT
Repository
bitbucket
Last release
5 years ago

Animate Scroll To

Nicely and smoothly animate a scrollTo action.

Installation

Using NPM:

npm install animate-scroll-to --save

Using Yarn:

yarn add animate-scroll-to

How to use

Use the helper function provided by the library.

animateScrollTo

Used to set the scroll position when a route is mounted.

import animateScrollTo from 'animate-scroll-to';

Accepts two arguments:

  • The pixel value to scroll to.
  • The duration of the animation in ms.
// Scroll back to top of the page in 1000ms.
animateScrollTo(0, 1000);
1.0.0

5 years ago

0.0.2

8 years ago

0.0.1

8 years ago