useScrollPosition
Track the scroll position or progress of the window or a target element.
Scroll to see the progress.
Type Definitions
const useScrollPosition: <T extends HTMLElement = HTMLDivElement>(ref?: React.RefObject<T> | null) => {
x: number;
y: number;
progressX: number;
progressY: number;
ref: React.RefObject<T>;
};