@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    
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    2
  • 1.0.2
    2

Package Sidebar

Install

npm i @neomasterr/scroll

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

6.14 kB

Total Files

3

Last publish

Collaborators

  • neomasterr