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

What is Framer? Join the Community
Return to index
Ed Chao
Posted Oct 31 - Read on Facebook

was working on a swiping view at work last night, simplified it for anyone who might need something similar. Use case: if you have a string of images or cards that you swipe to set incremental points, this sets all of your animation points so you don't have to do them one by one.

4 Comments

Rafael Lüder

Ed Chao this is really cool, thanks for sharing. I switched it to a horizontal flow instead. I noticed the last card in the sequence can get pushed outside of the screen and was wondering if it'd be possible to make it sticky as the first card. I thought of using maxY of the last item for DragEnd -> endY but couldn't find a way of identifying the last item. Do you have an idea of how to accomplish that?

Ed Chao

Rafael Lüder I'd probably put an if statement that animates the card container back to the final position if the value on DragEnd exceeds the total number of cards multiplied by cardHeight.

Ben Lamps

ty based Ed Chao

Read the entire post on Facebook