UNPKG

illusory

Version:

Seamlessly morph one element into another.

21 lines (20 loc) 914 B
import { IllusoryElement } from './IllusoryElement'; import { CloneProcessorFunction, FilterFunction } from './utils/duplicateNode'; export interface IIllusoryElementOptions { includeChildren: boolean; ignoreTransparency: boolean | string[]; preserveDataAttributes?: boolean | FilterFunction; processClone?: CloneProcessorFunction; attachImmediately?: boolean; } export interface IIllusoryOptions<T = Partial<IIllusoryElementOptions>> { element: T; compositeOnly: boolean; duration: string; easing: string; zIndex: number; beforeAnimate?: (from: IllusoryElement, to: IllusoryElement) => void | Promise<unknown>; beforeDetach?: (from: IllusoryElement, to: IllusoryElement, canceled: boolean) => void | Promise<unknown>; relativeTo: (HTMLElement | Document)[]; } export declare const DEFAULT_OPTIONS: IIllusoryOptions<IIllusoryElementOptions>;