0
0
Svelteframework~10 mins

Deferred transitions in Svelte - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the deferred transition function from Svelte.

Svelte
import { [1] } from 'svelte/transition';
Drag options to blanks, or click blank then click option'
Adeferred
Bdefer
Cdefered
DdeferredTransition
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling the function name as 'defer' or 'defered'.
2fill in blank
medium

Complete the code to apply a deferred transition to a div element.

Svelte
<div transition:[1]={{ duration: 400 }}>Hello</div>
Drag options to blanks, or click blank then click option'
Aslide
Bfade
Cfly
Ddeferred
Attempts:
3 left
💡 Hint
Common Mistakes
Using other transition names like 'fade' or 'slide' instead of 'deferred'.
3fill in blank
hard

Fix the error in the deferred transition usage by completing the code.

Svelte
<div transition:deferred={{ [1] }}>Content</div>
Drag options to blanks, or click blank then click option'
A(duration: 300)
B{ duration: 300 }
C[duration: 300]
Dduration: 300
Attempts:
3 left
💡 Hint
Common Mistakes
Passing parameters without curly braces or using wrong brackets.
4fill in blank
hard

Fill both blanks to create a deferred transition with a delay and duration.

Svelte
<div transition:[1]={{ [2] }}>Deferred Content</div>
Drag options to blanks, or click blank then click option'
Adeferred
B{ delay: 200, duration: 500 }
C{ duration: 500, delay: 200 }
Dfade
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'fade' instead of 'deferred' or wrong parameter object syntax.
5fill in blank
hard

Fill all three blanks to create a deferred transition with a custom easing function and duration.

Svelte
<script>
  import { [1] } from 'svelte/transition';
  import { [2] } from 'svelte/easing';
</script>

<div transition:[3]={{ duration: 600, easing: cubicInOut }}>Animated Text</div>
Drag options to blanks, or click blank then click option'
Adeferred
BcubicInOut
Dlinear
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up easing function names or transition names.