Combining transitions and animations
Layer transitions and animations together for rich, coordinated UI effects.
Layered Motion
Combine transition: and animate: for items that fade-in AND smoothly reposition.
Example
A todo list where new items fly in and existing items reorder smoothly.
{#each todos as todo (todo.id)}
<li in:fly={{ y: 20 }} animate:flip>{todo.text}</li>
{/each}All lessons in this course
- animate:flip for List Reordering
- The spring() and tweened() Stores
- Custom Easing Functions
- Combining transitions and animations