Figma Support Forum

Swap out non-components with components

I’d like to be able to take a non-component and swap it out for a component. I know you can already swap instances of a component with an instance of another component, but you can’t take something that isn’t already a component (or an instance) and swap it out with an existing component.

This plugin is really handy for that if the component is in the same file you are trying to swap with! Unfortunately, it doesn’t work with libraries at the moment.

Another ‘hacky’ workaround is:

Make non-component a component > duplicate > delete main component > now you should be able to swap the temporary component in your right-sidebar.

Hope this helps!


1 Like

That is hacky! But it would do the trick. I’ll try the plugin, as at this point all of the components are currently in the file.

For external components or if you want to preserve all overrides when attaching objects to component (texts, images, etc.) you can use my plugin Master.

  1. Select the component you want to link objects to. Go to Plugins → Master → Pick Target Component.
  2. Select objects you want to attach and run the command Plugins → Master → Link Objects to Target Component. These objects will be linked to the component that you picked and all possible overrides will be preserved if the structures of attached objects are the same as the main component.

To swap with local and external component I use this plugin :

Team Library Component Browser

:point_right: How to use Team Library Component Browser "For external library :

  1. Open this plugin in library what you want to list.

  2. Go to Setting tab in this plugin.

  3. Click ‘Save or update this library data’ button to save all components data in library to this plugin.

  4. Go back to your document and open this plugin.

  5. Find components by searching or scrolling, then double-click or click “Create” button to insert instance into the document.

  6. Enjoy🏖

:paintbrush: Notes:

Because of the specifications of Figma’s API, we can’t get team library data automatically.

So this plugin uses the figma.clientStorage API to store the library data on your machine.

To store library data in clientStorage, you need to run this plugin in your library.