@izhann/react-cursor-fx
Version:
Interactive cursor effects for React and Next.js applications — zero runtime dependencies
26 lines (25 loc) • 734 B
TypeScript
import type React from "react";
interface CursorDrawProps {
/** Ink color */
color?: string;
/** Stroke width in px */
width?: number;
/** z-index */
zIndex?: number;
/**
* How long strokes persist in ms before fading out.
* 0 = permanent until double-click or unmount.
*/
fadeTime?: number;
/** When false, drawing is paused but existing strokes are preserved */
enabled?: boolean;
/** Eraser diameter in px (right-click drag to erase) */
eraseWidth?: number;
/** Called after every draw stroke is completed */
onStroke?: (points: {
x: number;
y: number;
}[]) => void;
}
export declare const CursorDraw: React.FC<CursorDrawProps>;
export {};