Back to Plugins
Replace Layers

Replace Layers

<p>A Figma plugin to easily swap one layer with another.</p><h2>How to Use</h2><ol><li>Select a layer in your Figma document.</li><li>Click&nbsp;Set Source Layer</li><li>Select another layer or layers that you want to replace</li><li>Click&nbsp;Replace Layer(s)</li><li>Keep Transforms: Check this box if the layers you're replacing are rotated or scaled, and you want to apply those transforms to the replacements.&nbsp;Note&nbsp;Scaling can only be determined if the layer you're replacing is an instance of a component.</li></ol><h2><br></h2><h2>New in 1.1: "Replace Image Fills"</h2><p>If your source layer has one or more image fills, you can replace just the images on the destination layers. This is useful if you want to quickly set an image but don't want to lose the other fills or style treatments (which would get overridden if you naively copy-pasted a layer's properties)</p><h3>Now you can also paste or drag images into the image well to use as a source.</h3><p><br></p><h2>Other notes:</h2><p>Originally I wanted to be able to use the clipboard as the source for replacing a layer, but it's not possible in Figma. If you're using the Figma Desktop app, you can assign "Set Source Layer" to a keyboard shortcut as well.</p><p>If your source layer is a component, it will replace the target layer with an instance of that component.</p><p>The thumbnail that's generated when you set the source layer also acts as a quick export — just drag it to your desktop to get a 2x resolution PNG of the source layer.</p>

layersimagefillreplace

Plugin Preview

Replace Layers preview

About this plugin

A Figma plugin to easily swap one layer with another.

How to Use

  1. Select a layer in your Figma document.
  2. Click Set Source Layer
  3. Select another layer or layers that you want to replace
  4. Click Replace Layer(s)
  5. Keep Transforms: Check this box if the layers you're replacing are rotated or scaled, and you want to apply those transforms to the replacements. Note Scaling can only be determined if the layer you're replacing is an instance of a component.


New in 1.1: "Replace Image Fills"

If your source layer has one or more image fills, you can replace just the images on the destination layers. This is useful if you want to quickly set an image but don't want to lose the other fills or style treatments (which would get overridden if you naively copy-pasted a layer's properties)

Now you can also paste or drag images into the image well to use as a source.


Other notes:

Originally I wanted to be able to use the clipboard as the source for replacing a layer, but it's not possible in Figma. If you're using the Figma Desktop app, you can assign "Set Source Layer" to a keyboard shortcut as well.

If your source layer is a component, it will replace the target layer with an instance of that component.

The thumbnail that's generated when you set the source layer also acts as a quick export — just drag it to your desktop to get a 2x resolution PNG of the source layer.

Plugin Details

Version10
CreatedJune 15, 2020
Last UpdatedSeptember 28, 2020
CategoryUncategorized
CreatorJoshua Dickens
Stats3736 installs, 83 likes
PricingFree

Technical Details

  • API:1.0.0
  • UI:ui.html
  • main:code.js

More Like This

Discover other plugins in the same category.

No similar plugins found in this category.