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

What is Framer? Join the Community
Return to index
Anders Oscarsson
Posted Jun 19 - Read on Facebook

Hi guys I'm new to framer and this group! Does anyone know how to loop through a bunch of elements with the same name? I'm importing a Sketch document with different artboards and I wanna add an event to a repeated element that exists on multiple artboards and has the same name.


Henrique Gusso

for layer in Framer.CurrentContext._layers
if layer._info.originalName is 'nameYouWant'
print 'success!'

Not sure if super optimal but it should work, at least for you to put them on an array first and then start working with them.

Seth Klassen

You might want to check out this module:

Read the entire post on Facebook