🎞️ Animated Routes
How to animate route transitions in SvelteKit
Animated Route Component
<script>
import { fly} from "svelte/transition";
import { page } from "$app/stores";
</script>
{#key $page.url}
<div in:fly={{ x:'-100%', duration: 500 }}>
<slot />
</div>
{/key}
Login Layout
<AnimatedRoute>
<main>
...
</main>
</AnimatedRoute>