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

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

I'm trying to figure out if in the scroll component, i can add padding to the scroll.content. The contentInset property adds margin outside the content layer, I am looking to add padding inside the content layer. Any ideas?

4 Comments

Aalok Trivedi

I think you'll have to do that manually. You can add a wrapper inside the scroll.content with the correct padding (wrapper.width = scroll.content.width - padding * 2) and put your content inside tht wrapper

Rohan K

I was hoping for a better solution, but that seems like the best way. Although, I was able to add the padding to the width of the scroll component, which works fine for the top, right and left edge. But as I add more layers dynamically, the height of the content layer adjusts to be exactly at the bottom edge of the last element. Rt now i am just placing a blank layer at the very end every time a new element is added.

Aalok Trivedi

Have you looked at the iOS and material kit modules? You can set constraints to any object such as top, leading, trailing, and bottom and set them relative to any object

Read the entire post on Facebook