svelte/animate
import { function flip(node: Element, { from, to }: {
from: DOMRect;
to: DOMRect;
}, params?: FlipParams): AnimationConfig
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.
flip } from 'svelte/animate';flip
flip 関数は、要素の開始位置と終了位置を計算し、それらの間でアニメーションを行い、x と y の値を変換します。flip は First, Last, Invert, Play の略です。
function flip(
node: Element,
{
from,
to
}: {
from: DOMRect;
to: DOMRect;
},
params?: FlipParams
): AnimationConfig;AnimationConfig
interface AnimationConfig {…}delay?: number;duration?: number;easing?: (t: number) => number;css?: (t: number, u: number) => string;tick?: (t: number, u: number) => void;FlipParams
interface FlipParams {…}delay?: number;duration?: number | ((len: number) => number);easing?: (t: number) => number;前へ 次へ