Skip to content

@drawerly/core / dom / lockScroll

lockScroll()

ts
function lockScroll(): () => void;

Prevents the page from scrolling and returns a release function.

Locks are reference counted; styles are restored when the last one is released.

Returns

ts
(): void;

Returns

void

Released under the MIT License.