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

What is Framer? Join the Community
Return to index
Dimitri Campbell
Posted Feb 14 - Read on Facebook

I have a question about how to control/tweak the scroll animation. When you apply ScrollComponent.wrap to a layer it has its typical behavior where you can scroll it pretty far past its boundaries but it bounces back to a boundary edge when you let go.

Is there a way I could have the standard "rubber band" kind of behavior but add a "soft" boundary where the content ends and a "hard" boundary where the user can no longer scroll?

1 Comments

Benjamin Den Boer

Hi Dimitri Campbell — the ScrollComponent created by using the wrap() method is still completely customizable. Internally, we use a draggable layer — meaning, you can change the draggable properties by targeting scroll.content.draggable (given that you've named it 'scroll'). By customizing overdrag, bounce and momentum, you should be able to get just the effect you're after. And if you want to create a hard boundary, you can simply hard-set the scrollY at a certain point, too, using conditional statements. (If scroll.scrollY >= 100, set scroll.scrollY to 100.) :-)

Read the entire post on Facebook