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

What is Framer? Join the Community
Return to index
Daniel Caine
Posted Dec 07 - Read on Facebook

Hi guys,

When creating a new layer, and a series of child layers associated to the main parent layer (for examples, individual slides within a slider), is there a way to share properties between the layers in order to keep it DRY?

I've just recently spent this last weekend taking a code academy course to be able to use Framer, so this might be a silly question. Forgive me if that's the case!

Here's the code:

sliderView = new Layer
y: 131
width: Screen.width
height: 501

sliderContent = new Layer
width: sliderView.width
height: sliderView.height

slide1 = new Layer
image: "imported/ohlala--framerjs/images/Layer-Bitmap-E1F28C29-74F9-4667-B1FB-83F835F3109F.png"
width: sliderView.width
height: sliderView.height


Daniel Caine

Sorry, forgot to add: the properties I'm thinking of sharing are the widths and heights, seems they'll always be the same

Jordan Robert Dobson

You might be able to use the .copy() method?

Marc Krenn

Can you share the the whole project with us? Seeing the whole picture makes it easier for us to put you on the right track :)

In case you can't do that due to a NDA, you might be able to condense your project/problem down to a more generic one.

Read the entire post on Facebook