UNPKG

@izhann/react-cursor-fx

Version:

Interactive cursor effects for React and Next.js applications — zero runtime dependencies

17 lines (16 loc) 661 B
interface UseCursorZoneOptions { /** Cursor variant to activate when this zone is in view */ variant: string; /** * IntersectionObserver threshold (0–1). * 0 = triggers as soon as any pixel is visible. * 0.5 = triggers when 50% of the element is visible (default). */ threshold?: number; } /** * Returns a ref to attach to any element. When that element scrolls into the * viewport past `threshold`, the cursor variant switches automatically. */ export declare function useCursorZone<T extends HTMLElement = HTMLDivElement>({ variant, threshold, }: UseCursorZoneOptions): import("react").RefObject<T | null>; export {};