UNPKG

anime-ts

Version:

A lightweight and flexible JS/TS animation library that provides smooth animation with precise control. Features include customizable durations, timing functions, delays, and lifecycle hooks. Perfect for creating performant web animations with minimal ove

35 lines (34 loc) 923 B
interface AnimationDetailsT { to: string; from?: string; time?: number; ease?: string; delay?: number; } type CSSPropertiesT = 'opacity' | 'left' | 'top' | 'right' | 'bottom' | 'width' | 'height' | 'transform' | 'background' | string; interface AttributeT { [key: CSSPropertiesT]: string | AnimationDetailsT; } declare class Anime { private _target; private _attKey; onRun: () => any; onStart: () => any; onCancel: () => any; onEnd: () => any; private _activeTransitions; private _hasStarted; private _hasRun; constructor(target: string | HTMLElement, myAttribute: AttributeT, detail?: { time?: number; ease?: string; delay?: number; }); stop(): void; } export declare function An(target: string | HTMLElement, myAttribute: AttributeT, detail?: { time?: number; ease?: string; delay?: number; }): Anime; export {};