Skip to main content
Question

Swap instances doesn't keep the size set with variable of the switched component

  • May 30, 2025
  • 1 reply
  • 15 views

Bruno_Mattelet1

Heyy,

 

I have a card component with an icon container that I would like to switch with an asset container.

 

The icon container is a component with hug attributes. It contain an icon inside with a height defined with variable and a lock on aspect ratio.

The asset container is a component with a width in hug and a height attribute defined with a variable. It contain an asset inside with a fill height and a hug width.

 

I would like to switch the icon container with an asset container in my card.

When I’m switching the instance, the sizes and height are broken. 

I would like the height of my component to have the default size of the swapped instance but it’s keeping the original component size.

 

To be honest I don’t understand the behaviour and don’t know if I need to built my component differently.

 

Thanks !

 

I added a video explaining the behaviour

 

 

 

1 reply

y_toku
Figmate
  • Community Support
  • 2492 replies
  • June 6, 2025

Hi ​@Bruno_Mattelet1 

 

Thanks for reaching out and sharing that screen recording - it really helped me understand what you're experiencing. I tested this with a simplified sample, and the height with variables seems to change correctly (as shown in my video).
 

https://www.loom.com/share/c4077c82453547e386490116ec5eeaf4?sid=3f5636c0-52a7-4fd7-b4ef-5e65ff0f7f72

To troubleshoot further:

  1. Is this happening with just this specific instance, or does it occur with all instances when you swap with this asset container?

    • If it's limited to this specific instance, the issue might be with the instance itself. Please try using "Repair component connections" or "Repair variable connections" from the Actions menu (you can access this by pressing Command+K on Mac or Control+K on Windows).
  2. If the issue persists after repairing connections, try clearing your cache.

  3. If you're still experiencing the problem after these steps, please submit a formal bug report with detailed reproduction steps here: https://help.figma.com/hc/en-us/articles/360041468234-Submit-a-bug-report

Let me know how these steps work out for you!

 

Thanks,

Toku

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings