Skip to main content
hummh
Active Member
Oct 9, 2026 9:55 AM UTC
Question

Applied variable modes are NOT properly updated on library swap

Hello,

we found the following issue when swapping libraries. It seems Figma properly swaps variables, but not modes. As soon as a mode is applied on a frame or a component / variant it is not correctly swapped and shows duplicated modes.

We were able to isolate the issue in a very simple file setup (see attachment).

File 1 - Test Lib
Contains a simple color variable with 2 modes
Contains a simple style as well (not using the variable)

File 2 - Test Comp
Contains frames using the variables from the Test Lib, one applying also a mode, one applying the style.
Contains a simple component set. Each variant uses the variable. One variant also applies a mode.

This is how it looks in the original Test Lib file


This is how it looks in the original Test Comp file


After copying both files and swapping, it looks like this in the Text comp (copy)
Obviously the variable is still applied, but modes are not.


Library is correctly connected


When looking at the details of the layer it is very obvious that we have a broken mode reference to the original Test Lib, instead a correct swap to Test Lib (Copy).

 


The wrong mode does not even work which also proves that something is wrong. What ever you choose, nothing changes.

Expected behavior
The mode for TestLib should not be visible here at all. It should be linked to the swapped library (Test Lib (Copy))

Workaround
The only way to solve this, is to go manually (!) to every layer using a mode,  replace the mode with the correct one. Which is impossible in large files.

Please fix it!
I hope those are enough details to fix the bug, which is really crucial for using design systems in an enterprise environment. You guys create so many new tools, but pls don’t forget about your main product which is Figma.

6 replies

Jaycee Lewis
Figmate
Figmate
Oct 9, 2026 11:43 PM UTC

Hey hey ​@hummh 👋 Thanks for the very detailed post. You are a legend 🐐 I’ll submit this internally as a bug report. Based on past experience, they’ll will ask me to ask you for:

  • A screen recording showing the issue beginning-to-end (not zoomed-in, please)

If you cannot share it here for reasons (NDA, privacy, etc) you can DM me and we’ll get it worked out. Thank you very much! — Jaycee

hummh
hummhAuthor
Active Member
Oct 13, 2026 5:56 AM UTC

I think the example is pretty simple. Just follow those steps:

  • Import both files
  • Publish the TestLib
  • Open TestComp
  • Swap to the published TestLib
  • Voilá - all colors change, wrong modes applied
Emma Wingding
New Member
Oct 11, 2026 4:10 AM UTC

Thanks for documenting this so thoroughly, hummh — going layer by layer sounds painful.

 

One thing that might speed up the manual repair: instead of fixing each layer individually, try selecting all the affected layers together and replacing the mode in one go. When multiple layers share the same variable binding, Figma lets you change it for the whole selection at once, which should clear the stale reference without touching every layer one by one.

 

Not a fix for the underlying bug, but hopefully it saves some clicking until it's resolved.

hummh
hummhAuthor
Active Member
Oct 11, 2026 2:45 PM UTC

I know, but the problem starts already with detecting and selecting all the layers that have mode issues.

Emma Wingding
New Member
Oct 12, 2026 8:34 PM UTC

Ah, fair point — finding them is honestly half the battle. A couple of ideas that might make the detecting part less painful: if the variable is applied as a fill, try selecting one broken layer and going to Edit > Select all with > Same fill. That should grab every layer sharing that variable-bound fill in one go, which is probably close to your full affected set and saves the layer-by-layer hunt. For anything more thorough, there are community plugins built exactly for auditing variable usage — they can scan a file and select or list layers by variable or mode, which is basically what you'd want here. Either way, once you have the selection, the re-apply-the-mode-in-one-go trick from my earlier reply should do the rest. Hope that gets the list down to something manageable!

hummh
hummhAuthor
Active Member
Oct 16, 2026 6:19 AM UTC

So, the official reply from Figma was this: modes are NOT supported during library swap, which means variable swapping is incomplete and we have to take care ourselves - e.g. using the Figma agent.