@izhann/react-cursor-fx
Version:
Interactive cursor effects for React and Next.js applications — zero runtime dependencies
26 lines (25 loc) • 920 B
TypeScript
import type React from "react";
interface CursorLensProps {
/** Lens circle diameter in px (default 140) */
size?: number;
/** Zoom factor — how much the content is enlarged inside the lens (default 2.2) */
scale?: number;
/** Border of the circular lens frame */
border?: string;
/** z-index of the lens overlay (default 9995) */
zIndex?: number;
/** Content to wrap. The same content renders twice: once normally, once zoomed inside the lens. */
children: React.ReactNode;
}
/**
* Wraps children and shows a circular magnifying-glass lens that follows the
* cursor over the wrapped area. The lens renders a true zoomed copy of the
* children via DOM duplication + CSS scale — no canvas, no screenshots.
*
* @example
* <CursorLens scale={2.5}>
* <img src="..." alt="..." />
* </CursorLens>
*/
export declare const CursorLens: React.FC<CursorLensProps>;
export {};