@svelte-put/lockscroll
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@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>

Package Sidebar

Install

npm i @svelte-put/lockscroll

Weekly Downloads

151

Version

2.0.0

License

MIT

Unpacked Size

6.81 kB

Total Files

9

Last publish

Collaborators

  • vnphanquang