JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 105
  • Score
    100M100P100Q84720F
  • License MIT

locking scroll and hide scrollbar within an HTML element

Package Exports

  • @svelte-put/lockscroll

Readme

@svelte-put/lockscroll

npm.badge bundlephobia.badge docs.badge repl.badge

Svelte action use:lockscroll - locking scroll within an HTML element

svelte-put

This package is part of the @svelte-put family. For contributing guideline and more, refer to its readme.

Usage & Documentation

See the dedicated documentation page here.

Quick Start

<script>
    import { lockscroll } from '@svelte-put/lockscroll';

    let locked = $state(false);
</script>

<svelte:body use:lockscroll="{locked}" />

<button onclick="{()" ="">locked = !locked}>Toggle lock scroll on body</button>

Changelog