Skip to main content
Geghie
New Participant
September 1, 2026
Question

Allow Swap Library to Replace Local Variables with Published Library Variables

  • September 1, 2026
  • 1 reply
  • 39 views

Feature Request to Resolve Ongoing Library Problem: Allow Swap Library to Replace Local Variables with Published Library Variables

 

I would like Swap library to support replacing local variables in a file with variables from a published library when the collection structure and variable names match.


Today, Swap library only supports library-to-library swaps, which means local variables cannot be migrated directly to an existing published library.


This creates extra overhead because the workaround is to publish the local variables as a separate library first, only to swap them afterward.
 Since variable replacement by matching names already works within a local file, extending that behavior to local-to-library swaps would make migration to standardized library variables much easier.

 

Example:

  • A file has local variables in a collection called “Module 1 Semantic Theme.”
  • That file also has layers using local variables like “Color / Text / Primary” and “Color / Background / Default.”
  • Your published library “Module 1 Semantic Theme” contains a published collection with the same variable names.
  • Expected behavior: after selecting Swap library, Figma should detect the matching local variable names and replace those local variables with the published library variables.
  • Current behavior: Swap library does not replace them, because the variables are local to the file rather than coming from another library.

1 reply

Geghie
GeghieAuthor
New Participant
September 16, 2026

UPDATE:
 

This feature request was submitted to the Figma Team. Thank you Nancy in Customer Support!

 

This is what support sent specifically for those interested: 

“You're exactly right that currently the swap library feature is intended for swapping between libraries the file is consuming and not assets that are local to that same file.
 
That said, I went ahead and passed along a feature request to our team because I do see how extending this functionality to include assets in the current file would be helpful for your use case.
 
If you have any other details to add, please let me know, and we appreciate you taking the time to reach out and share your feedback with us.”

So if anyone has further feedback, please comment below. :)