Beta

useScrollPosition

React hook to get the scroll position of an element.

Made by lucas
0
X Position
0
Y Position

Installation

Usage

const { x, y, direction } = useScrollPosition({ throttleDelay: 50 });

Props

PropTypeDefault
element?
HTMLElement | null
-
throttleDelay?
number
-