Skip to main content
Question

Bug: Setting component variants to fill in a hugging parent increases the width infinitely

  • May 7, 2026
  • 2 replies
  • 41 views

Matt_Willett

I came across a fun bug today where setting the child of an auto-layout layer made its width increase infinitely.

Usually, when setting child layers to fill width, the parent auto-layout layer would auto-switch to a fixed width. However, today, that didn’t happen, and the container kept growing until I manually set it to fixed.

See the video.

In this case, I have variants for contents (text, number, slot) that I’ve placed in the header cell (but not yet in the body cell), all in the same variant set

 

2 replies

adamsmasher
Figmate

Hey ​@Matt_Willett! You’re right, this one is a bit fun.

 

Thanks for your post and for the screen recording - super helpful to see what you are describing and have some idea of the file structure. I tried to replicate it based on what I saw in a test file but didn’t see what you see, though I’m not sure if I properly replicated the layers and their properties for the test. Can you confirm if this is the same as what you have?

  1. Create a component with auto-layout enabled, the flow set to vertical, and resizing for width and height both set to hug.
  2. Add a few layers (I made some rectangles for this) of different widths inside the component, all with auto-layout on.
  3. Create a variant of the component.
  4. Create an instance of the variant.

When I select both child layers in the variant and change the width option to fill, they just update and don’t keep getting wider. I’m wondering if I’m not replicating your layers correctly, though.


Matt_Willett
  • Author
  • New Participant
  • May 26, 2026

This particular bug felt like a race condition in the code, where the underlying method that detects the change in auto-layout wasn’t caught. I copied the components directly to a brand new draft and it started growing again.
I’m going to attempt to recreate it on a personal instance of Figma, so that I can share it. Company policy etc etc