- Thread Author
- #1
I have a website which lists hiking tours as cards in Svelte. I use {#each} to generate the cards:
The contents of the cards are grabbed from a separate file in the directory, I'm not using APIs. I wanted to have animation for them when the website loads, for each to generate one-by-one. I tried
and added this to the main div of the card component:
But this only animates this way if the content is removed, not when loading the page.
Code:
{#each tours as tour}
<Card {tour} />
{/each}
Code:
import { fade, fly } from 'svelte/transition';
Code:
in:fly={{ y: 200, duration: 400 }} out:fade