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

What is Framer? Join the Community
Return to index
Vishwas Shetty
Posted Feb 20 - Read on Facebook

Question: Is there a way to scroll from the first page to the last page and vice versa for a page component (create a carousel). I tried using snapToPage, but it behaves quite weirdly.


Floris Verloop

Ello! Here's an example of how you might build an automated carousel, it's fairly easy to do →

Vishwas Shetty

Thanks for the example. In my case I have a left and a right arrow bar and on click of that the carousel moves left and right respectively. If its the first page, then on clicking the left arrow bar, it should move to the fifth page and vice versa. Can you help me with achieving this.

Jordan Robert Dobson

So you really want to make this [5a],[1a],[2],[3],[4],[5b],[1b]

Here's the rough logic

* Start it automatically on 1a
* if the user his the edges 5a or 1b immediately jump to 5b or 1a at the end of the animation or at the start of the drag...
* to detect changes use page.on "change:currentPage", (values...) ->

Read the entire post on Facebook