webcompile/src/lib/PageTransition.svelte
2023-02-03 19:55:33 +02:00

14 lines
225 B
Svelte

<script>
import { fly } from "svelte/transition";
export let pathname = "";
</script>
{#key pathname}
<div
in:fly={{ x: -10, duration: 250, delay: 250 }}
out:fly={{ x: 5, duration: 250 }}
>
<slot />
</div>
{/key}