Skip to content

qurle/swap-variables

Repository files navigation

Swap Variables for Figma

Just like Swap Libraries, but for variables.

Swap Variables cover

Readme на русском

How to use

Run it from the Quick Actions or Plugin menu. Select some layers, choose source and destination variable collections and hit Swap button.

You can choose the scope for plugin: selection, current page, all pages, local styles or links in local variables (aka aliases)ⁿᵉʷ.

After all, you may see some error. Click on them to focus viewport on problematic objects.

How it works

Swap Variables will display all local and enabled external variable collections that actually contains variables.

When you swap these collections, plugin will recursively find every used variable, then check two things:

  • variable exists in source collection,
  • destination collection containt variable with same group and name.

After the plugin ends its job, it will display known ecnountered errors below Swap button.

Known limitations

  • If you modified external libraries, reload file to apply changes.
  • Plugin doesn't swap styles. Use Swap Libraries instead.
  • Plugin can't swap strokes in section. That’s not supported by Figma API yet. Do it manually instead.
  • It may take some time to parse and swap variables when there're to many nodes or variables. Take a break and make some tea.

Problem? Idea? Kind words?

I accept feature suggestions and ideas to improve the plugin. No need to mess with hidden layers? Useful exceptions? If you have any ideas or issues, let me know in the comments.

Alternatively you can contact me via e-mail at nikita.denisov@vk.team and Telegram.

<3

About

Figma plugin that swaps variables. Like Swap Libraries but for variables

Topics

Resources

Stars

Watchers

Forks

Contributors

Generated from qurle/plugin-starter