@superstructure.net/scroll-lock
v0.0.2
Published
Reliably lock body scroll.
Downloads
4
Readme
# ########## #
# ScrollLock #
# ########## #
Reliably lock body scroll.
Installation
npm install @superstructure.net/scroll-lock
Note: This library comes as es6 module only. If you use a transpiler like babel or swc make sure to include
/node_modules/@superstructure.net/scroll-lock
in your transpiler’s config.
Usage
import ScrollLock from '@superstructure.net/scroll-lock';
const scrollLock = new ScrollLock();
scrollLock.enable();
scrollLock.disable();
scrollLock.destroy();