absolute-hover-cursor
Version:
Elevate user experience with seamless cursor interactions using hover-cursor, a small JS library. Create captivating web interfaces by dynamically crafting bespoke hover cursors that you can style however you need.
28 lines (27 loc) • 732 B
TypeScript
import './main.css';
interface HoverCursorOptions {
containerQuery: string;
snapPosition?: 'L' | 'M' | 'R' | null;
customClass?: string;
title?: string;
toggledTitle?: string;
icon?: string;
toggledIcon?: string;
toggledFunction?: () => void;
}
export declare class HoverCursor {
private mothers;
private snapPosition;
private callbackFunction;
private activeTitle;
private activeIcon;
private toggledIcon;
constructor(options: HoverCursorOptions);
private updateCursorPosition;
private snapCustomCursor;
private registerCustomCursor;
private toggleCustomCursorContent;
setIcon(icon: string): void;
setToggledIcon(icon: string): void;
}
export {};