tsimport {useScrollLock} from '@astryxdesign/core/hooks'
| Guidance | Practices |
|---|---|
| Do | Use when opening full-screen modals or dialogs to prevent background content from scrolling. |
| Do | Pass the same boolean that controls dialog visibility (e.g., isOpen) as the isLocked parameter. |
| Don't | Use for non-modal overlays like popovers or tooltips; users should be able to scroll away from those. |
| Param | Type | Description |
|---|---|---|
isLockedrequired | boolean | whether body scroll should be locked. |