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

What is Framer? Join the Community
Return to index
Greg Woods
Posted Jun 30 - Read on Facebook

Hi guys,
Is it possible to have two scroll components in the same prototype? I'm not sure how to define them separately. Any suggestions please?

# overview - scrolling content
scroll = ScrollComponent.wrap(demo.content)
scroll.scrollHorizontal = false

# overview2 - scrolling content
scroll2 = ScrollComponent.wrap(demo.content)
scroll2.scrollHorizontal = false


Balraj Chana

Yep: scroll2 = scroll.copy(). You can edit the properties of the copy like this: scroll2.props = x: 200, y: 100 etc

Greg Woods

Thanks Balraj, does this work when the content is different for each? That is what I am hoping to achieve.

Balraj Chana

Based on your original post, I assumed that you wanted to make a direct copy as you wrapped the same content in 2 different components.

You can create as many scroll components as you want with different content by either doing what you've posted above or using a loop.

Greg Woods

Ah I see. Can I use a different name for the layergroup instead of 'content' each time. eg. content2? Balraj chana

Balraj Chana

Sure! As many as you want:

Read the entire post on Facebook