Function toAnimation
- toAnimation(
fn: (node: Element, ...rest: any[]) => TransitionConfig,
): (
node: Element,
data: { from: DOMRect; to: DOMRect },
...rest: any,
) => any Parameters
- fn: (node: Element, ...rest: any[]) => TransitionConfig
A Svelte transition function.
Returns (node: Element, data: { from: DOMRect; to: DOMRect }, ...rest: any) => any
- Transition function converted to an animation.
- fn: (node: Element, ...rest: any[]) => TransitionConfig
Converts a Svelte transition to an animation. Both transitions & animations use the same CSS / styles solution and resulting data so wrap the transition function with the signature of an animation.