Hooks
/ API Reference
Hooks
/ API Reference

useScrollBlocking

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

ParameterTypeDefaultDescription
activebooleantrueWhether scrolling is blocked.
On this page