Function toAnimation
- to
Animation (fn): ((node: Element, data: {
from: DOMRect;
to: DOMRect;
}, ...rest: any) => any) Parameters
- fn: ((node: Element, ...rest: any[]) => TransitionConfig)
A Svelte transition function.
- (node, ...rest): TransitionConfig
Parameters
- node: Element
Rest
...rest: any[]
Returns TransitionConfig
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.