Svelte • Reference
svelte/animate
On this page
import {
AnimationConfig,
flip,
FlipParams
} from 'svelte/animate';AnimationConfig
export interface AnimationConfig {/*…*/}delay?: number;duration?: number;easing?: (t: number) => number;css?: (t: number, u: number) => string;tick?: (t: number, u: number) => void;FlipParams
export interface FlipParams {/*…*/}delay?: number;duration?: number | ((len: number) => number);easing?: (t: number) => number;flip
The flip function calculates the start and end position of an element and animates between them, translating the x and y values.
flip stands for First, Last, Invert, Play.
export function flip(node: Element, { from, to }: {
from: DOMRect;
to: DOMRect;
}, params?: FlipParams): AnimationConfig;