@neomasterr/scroll

1.0.3 • Public • Published

scroll

Install

npm install @neomasterr/scroll

Usage

Example 1

default behaviour

import Scroll from '@neomasterr/scroll';

Scroll.to(document.getElementById('foo'));

Example 2

custom options

import Scroll from '@neomasterr/scroll';

Scroll.to(document.getElementById('foo'), {
    time: 2.0,
    fps: 60,
    offsetY: 500,
    interruptable: false,
});

Example 3

callback (promise)

import Scroll from '@neomasterr/scroll';

Scroll.to(document.getElementById('foo')).then(() => {
    // scroll done
}).catch(() => {
    // scroll interrupted    
});

Package Sidebar

Install

npm i @neomasterr/scroll

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

6.14 kB

Total Files

3

Last publish

Collaborators

  • neomasterr