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

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

How can i create a new layer and fetch its name from a string variable? for e.g.

layerName = "strandA"
new Layer
-- name : layerName

3 Comments

Rohan K

-- is only to show indentation

Aalok Trivedi

This is what you want right?
name: "#{layerName}"

Rohan K

wait a sec, is the layer name different from the layer variable name? so basically, if i say:

layerA = new Layer
-- name : "a"

can i later say a.opacity = 0? or will i have to use childrenWithName to reference using the name property? if so, i guess what i am asking is, can i specify the layer variable name dynamically?

Read the entire post on Facebook