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

What is Framer? Join the Community
Return to index
Veronica Jimenez-Miller
Posted May 11 - Read on Facebook

Happy Monday Framers! What's the best way I could give shared properties to layers? My code is like this :

card_shadows = ["card_left", "card_middle", "card_right"] =
shadowY: 10
shadowBlur: 16
shadowColor: "rgba(0,0,0,0.4)"

This is not working ;'/ Do you have any suggestions?



Geunbae Lee

How about using functions?

Andreas Wahlström

A for loop would be great for this. Create an array with layers, eg. [card_left,card_middle] etc. then use a for loop to set the properties of each one. Here's a great article about arrays and loops:

Trevor Phillippi

Another option is to subclass Layer and make something like ShadowLayer with default properties and make each new card as a ShadowLayer as opposed to generic Layer type.

Veronica Jimenez-Miller

Boom, thank you guys!

Read the entire post on Facebook