@jswork/next-scroll-to

1.0.2 • Public • Published

next-scroll-to

Scroll to api.

version license size download

installation

npm install -S @jswork/next-scroll-to

usage

import '@jswork/next-scroll-to';

// top/bottom/number
nx.scrollTo({ el: document.querySelector('.abc'), to: 'top' });
nx.scrollTo({ el: document.querySelector('.abc'), to: 'bottom' });
nx.scrollTo({ el: document.querySelector('.abc'), to: 1000 });

set scroll-behavior: smooth;

Use css3 smooth-scroller.

license

Code released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @jswork/next-scroll-to

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

4.69 kB

Total Files

5

Last publish

Collaborators

  • afeiship