Complete the code to import the crossfade function from Svelte's transition module.
import { [1] } from 'svelte/transition';
The crossfade function is imported from svelte/transition to enable crossfade animations between list items.
Complete the code to create crossfade functions with default parameters.
const [[1], send] = crossfade({});The crossfade function returns a pair of functions: send and receive. The first is receive, the second is send. Here, receive is assigned to the first variable.
Fix the error in the list item transition directive to use the correct crossfade function.
<li transition:[1]={{key}}>{{item}}</li>The receive function is used in the transition: directive to animate items entering the list.
Fill both blanks to correctly apply crossfade transitions for list items leaving and entering.
<li out:[1]={{key}} in:[2]={{key}}>{{item}}</li>
The send function is used for the out: transition when items leave, and receive is used for the in: transition when items enter.
Fill all three blanks to create a crossfade with custom duration and easing.
const [receive, send] = crossfade({ duration: [1], easing: [2], fallback: [3] });The duration is set to 200 milliseconds, easing uses the cubicInOut function for smooth animation, and fallback is a function that does nothing if crossfade is not possible.