This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Jonathan Harvell
Posted Feb 18 - Read on Facebook

I'm using a page component and I would like to trigger an animation each time the page changes. Any idea why the code below doesn't work?

3 Comments

Jordan Robert Dobson

Have you tired to add...?

print page.currentPage.name

And see what it gives you?

Jonathan Harvell

interestingly, it's just printing "".

Øyvind Nordbø

Hi Jonathan!

You can also use page.currentPage method mentioned above in tandem with page.horizontalPageIndex, to get the current page in the page index and trigger animations based on what page is active. Attached you'll see an example of how this works. https://framer.cloud/bKgOj/

Read the entire post on Facebook