@izhann/react-cursor-fx
Version:
Interactive cursor effects for React and Next.js applications — zero runtime dependencies
17 lines (16 loc) • 605 B
TypeScript
interface UseCursorIdleOptions {
/** Milliseconds of no movement before idle triggers (default 2000) */
timeout?: number;
/** Cursor variant to activate on idle (default "spot") */
variant?: string;
/** Called when idle state starts */
onIdle?: () => void;
/** Called when cursor movement resumes */
onWake?: () => void;
}
/**
* Switches to a different cursor variant when the cursor hasn't moved
* for `timeout` ms. Reverts when movement resumes.
*/
export declare const useCursorIdle: ({ timeout, variant, onIdle, onWake, }?: UseCursorIdleOptions) => void;
export {};