Skip to main content
Kindstrand_Linus
New Participant
May 23, 2025
Solved

Color Variable Reset When Switching Icon Variants in Component Instances

  • May 23, 2025
  • 13 replies
  • 1317 views

Hey everyone!

Our team has built a multi-brand design system that supports three different brand themes, each with both light and dark modes.

All our icons are created as unions. This helps preserve the color override when an icon is swapped inside a component. For example: all icons use the “icon” color variable by default, but within a success inline message component, the icon is overridden with the “icon-success” color variable (green), as the icon should always be green in that context. Swapping, say, a checkmark icon with “icon-success” applied for a shield icon retains the correct “icon-success” variable. So far, so good.

However, when we re-theme the inline message component from Brand 1 to Brand 2, the icon switches to a different brand-specific variant from the icon component set. Here’s where things break: in component instances, the color override (“icon-success”) is lost during this brand switch, and the icon falls back to the default “icon” color variable — which in our case is black. This results in applications where everything re-themes correctly except the icons, which suddenly appear in the wrong color.

We understand this is technically an override, and that swapping icon variants may reset such overrides. But the odd part is: this issue only occurs in component instances. In base components or standalone frames, re-theming works as expected and color overrides persist across variants. It's only in instances that the override is stripped out.

I’ve attached a video showing the issue in action. We’d love any guidance, workarounds, or insights into this — but ideally, we’re hoping for a native Figma fix, as this seems to be an inconsistency in how theming is applied to instances vs. base components.

Thanks in advance!

Best answer by y_toku

Hi there, 

 

Thank you for bringing this issue to our attention, and I apologize for the inconvenience you're experiencing!

After checking our internal system, I found a potentially similar issue that's already been reported to our engineering team (regarding color overrides not being preserved after instance swap).

I've flagged your case internally with a reference to this existing issue. However, if your specific problem turns out to be different, our engineering team would need more details about your particular situation to properly investigate.

Could you please submit a formal bug report with detailed reproduction steps? This would ensure our engineers have all the information they need to address your specific issue: https://help.figma.com/hc/en-us/articles/360041468234-Submit-a-bug-report

 

Thanks for your patience,

Toku

 

13 replies

Alyssa_Maac2
New Member
April 6, 2026

To anyone looking for solution. There’s a dirty trick to do which is take an instance of any icon you have and then apply union to it then turn it into a component then it will be the icon you will use for buttons. Someone did a demo here.

Elijah Shah
New Member
July 21, 2026

Just wanting to report that this issue is still relevant and still very frustrating. Please fix it.

djv
Figmate
Community Support
July 22, 2026

Hey All, thank you for continuing to chime in here! (And thank you ​@Alyssa_Maac2 for sharing that temporary solution with the community.)

I completely understand how this must be slowing down your workflow. To those still running into this issue, I want to be upfront: this ties back to a known limitation in how color overrides transfer when an instance swap is triggered by a variable/mode change rather than a manual variant switch. The good news is our engineering team has already shipped real improvements here, and most cases now work as expected. The tricky part is that a handful of edge cases still remain (as demonstrated within this topic) that usually involving deeper nesting or multiple instance swaps stacked together. Each will needs its own investigation with support to confirm it's the same root cause.

To understand what’s happening for each individual, could you help me with a couple things?

  1. A quick screen recording (or duplicated file URL with Can View access) showing the icon losing its override; specifically whether it happens on a mode switch, a manual variant change, or both?
  2. Roughly how deep is the nesting where you're seeing it (e.g. icon → button → card)?

This will let us confirm whether you're hitting the same gap as the original report or a newer edge case.