Hooks
/ API ReferenceHooks
/ API ReferenceuseScrollBlocking
A hook that allows you to toggle body scrolling.
The Gist
'use client'
import { useScrollBlocking } from '@weser/hooks'
function Component() {
useScrollBlocking(true)
return <div>Scroll me</div>
}
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
active | boolean | true | Whether scrolling is blocked. |
© 2024-present Robin Weser. All Rights Reserved.