d2js-anim-lib
Version:
Lightweight animation library with support for React, Vue, and Angular
22 lines (21 loc) • 769 B
TypeScript
import { App, ObjectDirective } from 'vue';
import { RotateOptions, BounceOptions, DragOptions } from '../core';
interface AnimationDirectiveValue {
rotate?: RotateOptions & {
trigger?: 'click' | 'hover' | 'mount' | null;
};
bounce?: BounceOptions & {
trigger?: 'click' | 'hover' | 'mount' | null;
};
drag?: DragOptions;
}
export declare const vAnimate: ObjectDirective<HTMLElement, AnimationDirectiveValue>;
export declare function useAnimations(): {
rotate: (el: HTMLElement, options?: RotateOptions) => void;
bounce: (el: HTMLElement, options?: BounceOptions) => void;
enableDrag: (el: HTMLElement, options?: DragOptions) => () => void;
};
export declare const D2jsPlugin: {
install(app: App): void;
};
export {};