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

What is Framer? Join the Community
Return to index
Mark Kinsey
Posted Dec 14 - Read on Facebook

I'm designing something like this:


What's the cleanest way to listen for events on each Like_button? (all the layers are imported from sketch - *not* generated from data)

I thought maybe I could iterate through Item_, and look for the Like_button sublayer, but it has a different name each time. Could use string matching, which seems sloppy. I guess the only other way would be if you could assign an attribute in sketch using a layer naming convention - e.g. Like_button[like_button], which framer would rename to Like_button_n[like_button], and could be referred to as sketch.Like_button_n or sketch.Item_1.like_button (starts to look like a CSS id/class-like system)


Mark Kinsey

yep - though framer creates unique names from every layer in a sketch import

Read the entire post on Facebook