Replace a layer with component

Hey Harsha, same problem: needed to replace a hundred components. Lucky thing is that they all have the same name. What I did is:

  1. Searched for that layer name, results showed
  2. I copied the component that will replace them (make sure it has a different name than the ones to be replaced)
  3. And then I just pressed cmd + shift + R until all the components in the results were replaced.

Manual, but worked for me in a matter of seconds. Hope this helps, thanks.

2 Likes

Using Select Layers plugin is cleaner… not promoting it, just is and it’s free:

  1. Copy your component
  2. Select all (cmd/ctrl + A)
  3. Run plugin called Select Layers - Select Layers by Name, exact match checked (or select any relevant category)
  4. Step2 selects all relevant layers, then simply cmd/ctrl + shift + R to replace all those layers.

Note: sizing and location have to be identical for replacement to be clean. Set your object/component how you want it before Step 1, then copy it.

1 Like

How to Change Color of PNG/JPEG Image in Figma