//#region src/hooks/useScrollDirection/useScrollDirection.d.ts type ScrollDirection = 'up' | 'down' | null; type ScrollDirectionState = { /** Current scroll direction */ direction: ScrollDirection; /** Current scroll Y position (px) */ position: number; }; type UseScrollDirectionOptions = { /** Throttle interval (ms) - default: 50ms */ throttleMs?: number; }; /** * @description * `useScrollDirection` is a React hook that detects scroll direction. * It returns scroll direction (up/down) and current scroll position. * Throttled by default (50ms) for performance. * * @param {UseScrollDirectionOptions} [options] - Configuration options. * @param {number} [options.throttleMs=50] - Throttle interval in milliseconds. * @returns {ScrollDirectionState} Scroll direction state: `direction` (`'up' | 'down' | null`) and `position` (px). * * @example * function Header() { * const { direction, position } = useScrollDirection(); * * // Hide header on scroll down * const isHidden = direction === 'down' && position > 100; * * return ( *
* My Header *
* ); * } */ declare function useScrollDirection(options?: UseScrollDirectionOptions): ScrollDirectionState; //#endregion export { useScrollDirection }; //# sourceMappingURL=useScrollDirection.d.mts.map