next-scroll-to
Scroll to api.
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 });
scroll-behavior: smooth;
set Use css3 smooth-scroller.
license
Code released under the MIT license.