Skip to content
0

katanakit-js / useIsAtTop

Function: useIsAtTop() ​

ts
function useIsAtTop(threshold?): boolean;

Defined in: src/infrastructure/viewport/viewport.service.ts:134

Checks whether the page is scrolled to (or near) the top.

Parameters ​

ParameterTypeDefault valueDescription
thresholdnumber0Pixel tolerance (default: 0).

Returns ​

boolean

true if scrollY <= threshold.

Released under the MIT License.