Skip to content

UseIsAtTop

katanakit-js / useIsAtTop

function useIsAtTop(threshold?): boolean;

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

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

Parameter Type Default value Description
threshold? number 0 Pixel tolerance (default: 0).

boolean

true if scrollY <= threshold.