Matching elements across Frames

Hi.

Is there some way that I can know that certain elements are the same across Frames?

Example wise, the red rectangles on the left, needs to be the same across frames, but they don’t share ID, or anything else, besides possibly the name.

Is there any way to match these elements?

Thank you in advance.

Yes, you can write a function that will check the properties for compliance, for example, name, width, height, fills, fillStyleId, etc. of the objects you need.

@tank666 This was also my original thought. However as the elements can be placed differently, and have different height and width values, based on their format, these data can differ.

Since the properties of these elements are different (not the same), then we can consider that they are different elements.

@tank666 I understand that’s how you see, and Figma aswell, but thats not the case for my needs.

In that case, I think you need to decide for yourself what criteria to use to detect matches. Perhaps, in addition to the name (which can be changed by the user), you should check the node type (frame, rectangle, vector, instance, etc.). If the node is an instance, you can check its main component.

1 Like