Skip to main content
Simon_Coong
July 24, 2023
Question

Figma variables, and multiple swappable styling libraries

  • July 24, 2023
  • 23 replies
  • 7798 views

In the past, when you created Colour Styles and Text Styles, you could (along with identically named components) swap them out for each other by using the “Swap library” functionality in the Libraries panel. That functionality still works, and is great.

However, Variables don’t seem to swap over in the same manner, which makes some sense as they’re not detected by the “Swap library” panel currently. Is there any way you can switch out Variables in batch when swapping libraries so they update everything eg colour, padding margin, booleans etc, or am I unable to use Variables for anything outside of local styling for now?

For context, I’m creating a design system for a white-label product that can swap the associated branding on the fly depending on the target client. Naturally, colours, fonts, logos etc need to be switched out, and they work fine with the older method of library definition, but Id like to be able to specify padding, margins and other similar properties as part of the branding libraries so that they update the associated components correctly.

Any help is appreciated and thanked in advance.

This topic has been closed for replies.

23 replies

Andrea_R
New Participant
April 29, 2024

This is exactly how we work too! The variable sets should swap along with the library.

An enterprise feature with extra brand tokens might be interesting for some cases, but it wouldn’t be necessary to keep the master connected in most cases (as I imagine the planned enterprise feature).
For many clients the master library suits as a base to copy and style, but then the files move in different directions to suit individual needs.

The enterprise subscription is also pretty expensive for little companies and even major ones seem to be hesitant to pay so much, from what I hear from fellow designers.

qurle
New Participant
May 7, 2024

I made plugin called Swap Variables that may help you.

It swaps variable collections, replacing variables by their name. We use it to extend our design systems to multiple products.

Hope that Figma will roll out multibrand suitable collections soon, but currently we use this plugin as workaround.

There’re some other plugins like Variables Pro and Swap Variables by Pavel Kisilev

Isabelle_Almeida
July 17, 2024

I am hoping for some solution from Figma soon. I am having the exact same issue we have a main design system with all components and screens this is linked to a separate file that we have our foundations so all colours set to semantic variables + global styles, typography, spacing etc.
As a company that works B2C we need to apply partner colours to our designs and with 100+ partners the modes just won’t work. Also I want to keep modes specifically to light, dark, high contrast etc.
Issue is when duplicating the main files to apply partner branding we need to swap the libraries, before that was easily done with the swap panel but now requires a lot of manual work.
Does anyone uses any plugins that can connect them as a library and not locally?

Sean_Cooley
New Participant
August 19, 2024

I achieve this by having a primitive file for each brand that is then aliased into a foundational collection with modes for each brand.

Jan_Kopriva_BSSHOP_s.r.o
New Participant
October 8, 2024

Hole Figma is gamechanger, working like coding… Why you cant use Variables the same way like CSS. I am waiting for Figma will makes it work, but after a Year, still plugins, pulgins, plugins… Are plugin makers more smart, than hole Figma team? I only need to have library of component, shared through many projects and use its only library with spacing, colors, fonts in Variables. Only change the variables library and thats it! To keep the components in actual version, changing only the Variables library. Please… Do it simple!

Adam_Gordon
New Participant
October 31, 2024

Still can’t believe this isn’t a standard feature set, our team really need better support for swapping variables. We have a master customisable white label product, that clients can update and change to meet their needs.

The problem is, there is limited ways to create a ‘project template’ with multiple libraries. So not only do I have to duplicate each file individually when we start a new project, I also then have to go through and library swap, and then use a plugin to haphazardly swap all of the variables.

While I am extremely grateful for the plugins, I have 0 visibility if something hasn’t been swapped out correctly. It is also painstakingly slow to go through all the files I need to, I just wish this was something that was baked into Figma.

Would this all be solved if we could simply duplicate a project, or set it up as a template that severs any connection to the original and is remapped automatically? To me this would be perfect, and resolve many of the issues my team and I face on a daily basis.

Ienaka_Atsushi
New Member
November 8, 2024

Swapping variables is essential. I’ve noticed some comments suggesting a rumor that this feature might be supported in a beta version, but I haven’t seen any official information. Is there a plan to support this functionality?

Neil7
New Participant
November 21, 2024

I also have this issue.

My understanding has always been that Figma Variables/Tokens will replace Styles. Currently when I sway library ONLY the styles are swapped. I need to manually reapply the variables from the swapped library.

Screenshot shows what actually gets remapped when swapping one library to another. The 200+ system variable names are not applied to the design. Original design uses the same names.

I expect the variables/tokesn to also be remapped in this list

Adam_Gordon
New Participant
March 4, 2025

​@dvaliao are you able to provide any update on this?  I have seen you point many people to the post, so would just like to see if there's any progress in resolving some of the issues raised?

djv
Figmate
Community Support
March 7, 2025

Hey ​@Adam_Gordon, thanks for following up! 

This is still on the the team’s radar for the future, and we do send over each additional request to hopefully advocate for its implementation. The variables team does have something in the works, but right now, we don’t have an exact timeline to share on when it will be implemented.