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.
