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

What is Framer? Join the Community
Return to index
Jeff Lin
Posted Aug 01 - Read on Facebook

Hi guys,

I'm trying to make a “PageComponent" that swipes to the left or right endlessly, with looping pages (3 pages).
The link below shows how I achieved it, but the code is complicated and messy. Can anyone think of a simpler and faster way to do this? Thanks
http://share.framerjs.com/dk5y0qbrvseg/

8 Comments

Bo Jan

Hi Jeff, I hope it doesn't break hahaha. http://share.framerjs.com/7jjes87p4moq/. It needs at least 3 items right now though. I hope this helps.

Jeff Lin

Thanks for the help! :) Bo Jan

Антон Карташов

23 lines http://share.framerjs.com/hs2iqoridjns/

(But now only works to the right)

Bo Jan

Nice, it's much shorter than mine. But you are creating a new object each time you swipe, right?

Антон Карташов

Bo Jan Yes. And it begins to work slowly when a large number of items :–)

Антон Карташов

Also we could generate 100-200 pages on creating. It could be pretty enough for prototype. Just imitate the infinity.
http://share.framerjs.com/xqkc3vn4x3wh/

Bo Jan

Have you checked out my version. I am just looping the same image back and forth. Need to add a fallback for the case of 1-2 images

Антон Карташов

Bo Jan I see. That's what I like about coding. The same simple thing you can do in a million ways

Read the entire post on Facebook