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

What is Framer? Join the Community
Return to index
Brad Wrage
Posted Mar 15 - Read on Facebook

Hey all, I've got some horizontal cards i'm scrolling through in a page component that I have snapToPage upon start. I also have some opacity and scaling happening as I scroll with page.on "change:currentPage"—which is only happening after scrolling. I'd like the changes to happen upon the snaptopage upon start as well. I am also looking to trigger an event upon trying to scroll past the final page. Can anyone help me out here?


Sam Olaogun

I would prob abstract the changes in opacity and scale on "snapToPage" and "change:currentPage" into a function that is invoked on the "change:currentPage" event and directly before the "snapToPage" method is invoked. To check if the current page has a successor, I would prob invoke the ".nextPage()" method on the "PageComponent" and if that return undefined on the last page (as it should), I would listen for any swipes to the left greater than a specific threshold.

Sam Olaogun

Brad Wrage Also, is this what you're trying to achieve with the scaling/opacity effect?

Read the entire post on Facebook