Skip to content

useScrollLock

@astryxdesign/core v0.7.1 · useScrollLock

Parameters ​

NameTypeDefaultDescription
isLockedRef<boolean>—Whether body scroll should be locked. Read through a watcher, so pass a ref or a computed, not a plain boolean.

Returns ​

None. The lock is a side effect on document.body.style.overflow, and nothing is rendered.