--- category: Sensors --- # useScrollLock Lock scrolling of the element. ## Usage ```vue ``` ## Directive Usage ```vue ``` ## Type Declarations ```ts /** * Lock scrolling of the element. * * @see https://vueuse.org/useScrollLock * @param element */ export declare function useScrollLock( element: MaybeRefOrGetter< HTMLElement | SVGElement | Window | Document | null | undefined >, initialState?: boolean, ): WritableComputedRef ```