Hook
/ API Reference
Hook
/ API Reference

useScrollBlocking

A hook that allows you to toggle body scrolling.

The Gist

'use client'
import { useScrollBlocking } from '@weser/hook'

function Component() {
  useScrollBlocking(true)

  return <div>Scroll me</div>
}

Parameters

ParameterTypeDefaultDescription
activebooleantrueWhether scrolling is blocked.
On this page