npm.io
0.5.1 • Published 3 years ago

smooth-scroll-to

Licence
MIT
Version
0.5.1
Deps
4
Size
7 kB
Vulns
0
Weekly
0
Stars
13

Smooth scroll to for ES6

NPM

https://npm.im/smooth-scroll-to

GIT

https://github.com/react-atomic/react-atomic-organism/tree/master/lib/smooth-scroll-to

How to use


import smoothScrollTo from 'smooth-scroll-to';
smoothScrollTo(100);

Attribute

smoothScrollTo(to, duration, el);

  • to: scroll to where
  • duration(option, default 900): for how may time
  • el(option, default body): scroll node element

ScrollToOptions

https://caniuse.com/mdn-api_scrolltooptions_behavior

Keywords