animotionjs / animotion

🪄 Create beautiful presentations with Svelte
https://animotion.pages.dev
MIT License
1.3k stars 38 forks source link

Changing Slide/Transition from code #27

Closed flymedllva closed 2 months ago

flymedllva commented 2 months ago

In all the examples, you make a new Slide and place a Transition in it. It turns out that when I open the slide I see a blank page, although I would like to see the result of the first animation. This gave me the idea to switch the Transition when the slide is turned on, but I haven't found how to do it.

mattcroat commented 2 months ago

You can pass the visible attribute from the docs example if you only want to animate the element in the future:

<Slide>
  <Transition visible>
    Visible
  </Transition>
</Slide>