@burst/scroll-lock

Scroll Lock

Usage no npm install needed!

<script type="module">
  import burstScrollLock from 'https://cdn.skypack.dev/@burst/scroll-lock';
</script>

README

@burst/scroll-lock

Lock scroll position. A scroll lock class is added. Default lock clas is is-scroll-disabled

Installation

npm i @burst/scroll-lock --save-dev

Usage

import { scrollLock } from '@burst/scrollLock';

lockScroll.lockScroll();
// options
// scrollClass = 'is-scroll-disabled',
// setScroll = true,
// setFixed = true,

lockScroll.releaseScroll(true); // use true to remove all fixed styling on the document