hover-effects-ts
Version:
A collection of beautiful hover effects for images using canvas
28 lines • 1.06 kB
TypeScript
/**
* Get target elements from various input types
* @param target - A CSS selector, HTMLElement, or NodeList of HTMLElements
* @returns An array of HTMLElements
*/
export declare function getTargets(target: string | HTMLElement | NodeListOf<HTMLElement>): HTMLElement[];
/**
* Shade a color by a percentage
* @param rgb - RGB color string (e.g., 'rgb(255,255,255)')
* @param pct - Percentage to shade (-1 to 1)
* @returns Shaded RGB color string
*/
export declare function shadeColor(rgb: string, pct: number): string;
/**
* Create a wrapper element for an effect
* @param element - Element to wrap
* @param className - Class name for the wrapper
* @returns The wrapper element
*/
export declare function createWrapper(element: HTMLElement, className: string): HTMLElement;
/**
* Create and setup a canvas element
* @param width - Canvas width
* @param height - Canvas height
* @returns The configured canvas element
*/
export declare function createCanvas(width: number, height: number): HTMLCanvasElement;
//# sourceMappingURL=utils.d.ts.map