Swap style and component libraries
Who can use this feature
Supported on Professional, Education, and Organization plans.
Only people with Can edit access to the file, and at least can view access to affected libraries.
Swap libraries lets you to quickly update all instances in a file, so they use components from another library. Use swap library to:
- Use a different or newer version of a library
- Swap to external or agency-provided libraries
- Manage instances from missing or unpublished libraries
How does swap library work?
Swap library lets you replace styles and components in the current file with instances from another library. You can swap any library you have at least can view access to.
Figma looks for any matching styles and components in the selected library. Matching is based on the style or component name only. This includes components sets and the variants within them.
If you've deleted components, or recreated them with different names, Figma won't recognize or match these components.
Unmatched assets
If a matching style or component isn't found in your selected library, Figma won't swap those assets. They'll stay connected to the original library.
You can ignore these styles and instances, delete them from the file, or manually swap them using the Instance menu. Swap between component instances →
Swap or override styles
The Swap default styles in instances setting allows you to control how styles are applied to instances.
- Checked: Figma applies matching styles to instances as overrides. If you make changes to the main components, Figma will preserve any overrides you applied via swap libraries.
- Unchecked: Figma applies the styles to any local instances. When you make changes to the main components, any changes you applied to local instances via swap libraries will be overwritten.
If you're swapping to an updated version of a library, or replacing a missing library, you'll likely be swapping both styles and components. Leave this setting unchecked to swap local instances and use the styles defined on the main components.
Local instances will continue to receive updates from their main components and any changes you applied to local instances via swap libraries will be overwritten.
Regardless of whether this box is checked, Figma will preserve any overrides — which aren’t related to swapped styles — applied to local instances. Learn more about override preservation →
Swap between libraries
Swap styles and components in the current file with instances from another library. This replaces local instances with matching instances from another library.
- Open the Assets panel in the left sidebar.
- Click Library to open the library modal.
- View a list of all libraries which have styles and components Used in this file.
-
Select a library to view the styles and components in that library.
- Click Swap library at the bottom of the modal.
- Use the Choose library field to select a library.
- View libraries available to the entire organization
- Explore published libraries by team
- Figma looks for any matching styles and components based on name only.
- If a matching style or component is found, the box next to the asset is checked and you'll see a preview in the selected library.
- If no matching styles or components are found, the box is unchecked and you'll see a None found message.
- If there are incorrect or undesired matches, use the checkbox to remove the asset from the swap.
- Decide whether to apply matched styles as overrides using the Swap default styles in instances ↑ setting.
- Check to apply matched styles as overrides.
- Leave unchecked to swap instances and use the default styles defined on the main components. Figma will preserve any supported overrides you've applied (default).
- Click Swap library to replace assets with assets from your selected library.
Manage missing libraries
Styles and instances can be disconnected from their library when the original file is unpublished, deprecated, or moved to a team you can't access.
Use the library modal to view styles and instances in the current file which aren't connected to an active library. Then use Swap library to replace any local instances with instances from another library.
Figma matches styles and components by name only. It's not possible to manually select a new style or component, or match to an asset with a slightly different name. Figma won't swap any styles and components without a match. You can also deselected any matched assets you don't want to swap.
Swap missing libraries
- Open the Assets panel in the left sidebar.
- Click Library to open the library modal.
- In the Used in this file section, select the Missing libraries option.
- View a list of styles and components no longer linked to an active library. Figma groups styles and components by their origin library and shows the number of styles and components.
- Select a library to view the affected styles and components. View the original library's name at the top and a preview of every style and component.
- Use the Choose library field to select a library.
- View libraries available to the entire organization
- Explore published libraries by team
- Figma looks for any matching styles and components based on name only.
- If a matching style or component is found, the box next to the asset is checked and you'll see a preview in the selected library.
- If no matching styles or components are found, the box is unchecked and you'll see a None found message.
- If there are incorrect or undesired matches, use the checkbox to remove the asset from the swap.
- Decide whether to apply match styles as overrides using the Swap default styles in instances ↑ setting.
- Check to apply matched styles as overrides.
- Leave unchecked to swap instances and use styles defined on the main components. Figma will preserve any supported overrides you've applied (default).
- Click Swap library to replace affected instances with instances from your selected library.
Undo swap library
There's isn't currently a way to undo a library swap using a shortcut. You have a few options for reversing your changes:
- Swap the library back using the same method described above.
- Restore a previous version of the library to a version before the swap.
If you checked "Swap default styles in instances" when swapping libraries, you can reset overrides to revert to the previous library. Learn how to reset overrides →