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

What is Framer? Join the Community
Return to index
Fausto Pérez
Posted May 14 - Read on Facebook

HI all, this is my first post here, and my first Framer prototype:

I have a question regarding my code, thanks in advance for your help:

Is there a way access the layers by name? I could create the circles in a for loop, assign them a name but I'm not sure how to access the layers later.

Thanks a lot!


Ankit Joshi

Cool! can be a potential 'pull to refresh'

Chris Camargo

Fausto, before your for loop, create an empty array to hold the layers you're about to create. Inside your for loop, after you create each layer and give it a name, push them into the empty array. Then, you can loop over the array, and use an if statement to check if is equal to the name you're looking for. If so, do stuff.

Robert M

Hi Fausto, given this is your first Framer prototype, I can tell you are on track to be a rockstart with the software.

I challenged myself to re-create your prototype without looking at your code (as part of my 100 prototypes in 100 days campaign - ).

Here's what I was able to cobble together. Feel free to review and comment on the code. I hope it helps you in some way.

Fausto Pérez

Robert M, the work you're doing is truly inspirational, and your solution is far more elegant than mine... still a lot to learn. Thanks for sharing!

Read the entire post on Facebook