Tracks whether any scrollable container with .overflow-y-auto has scrolled past a threshold (default 20px). Returns a getter/setter pair for use with Svelte 5 $state.
.overflow-y-auto
Usage in a component:
let isScrolled = $state(false);useScrollDetect((v) => (isScrolled = v)); Copy
let isScrolled = $state(false);useScrollDetect((v) => (isScrolled = v));
Tracks whether any scrollable container with
.overflow-y-autohas scrolled past a threshold (default 20px). Returns a getter/setter pair for use with Svelte 5 $state.Usage in a component: