use-window-scroll
Tracks window scroll position
Source
Docs
Package
Usage
use-window-scroll
returns current scroll position and a function to scroll smoothly to given position:
Scroll position x: 0, y: 0
Definition
Exported types
UseWindowScrollTo
, UseWindowScrollPosition
and UseWindowScrollReturnValue
types are exported from @mantine/hooks
package,
you can import them in your application: