#Page Transitions with GSAP in Nuxt 3?

11 messages · Page 1 of 1 (latest)

dawn fern
#

Does anybody has experience with GSAP Route transitions in Nuxt 3? I need help with the implementation. My goal is a transition like on the website of www.antoni.de

opal kraken
#

Wow, sounds interesting, I would to hear something about it too

regal kindle
#

You can create transitions as functions with gsap, and then on the <Transition> element wrapped around your page, add those functions to @enter-from, @leave-from, etc. Add a key to your pages so it always changes.
More info on this in vue docs

low fiber
dawn fern
#

of course i was reading the documentation. but it's not good enough.

#

onBeforeEnter: (el) => {
console.log('Before enter...')
},
onEnter: (el, done) => {},
onAfterEnter: (el) => {}

#

what is with the leaving the page?

#

i feel like the hooks doesn't really work

regal kindle
#

@dawn fern likely user error, post your definePageMeta, and please format your code this time...