Skip to main content

"Empty" Auto Layout Frame keeps the size of last hidden child

  • May 19, 2022
  • 124 replies
  • 13959 views

Show first post

124 replies

Mahdi Rahman

We need if/else relative functionality for boolean properties, or at least having  a toggle in auto layout frame setting to hide a frame when it is empty.


andrew.taylor

+1 for this fix. I have an older component that was using too many variants that I’m cleaning up and the older comp works how we intend it to but when I create the new one with more boolean properties then the container won’t collapse (outlined in Red). I’m pulling my hair out. 

 

The top screen shot shows the row 2 layer and it’s children hidden. The comp then was responsive and hugged the contents visible.

 

The bottom screen shows the row 2 layer and it’s children hidden but the comp doesn’t respond and hug. 

 


Antoine
  • Author
  • Active Member
  • July 22, 2025

3 years later and still no solution, c’mon Figma!


Ashley_Presman

Please fix! I just had to create 80+ additional variants due to this issue and will have to follow this pattern for other components as well. 


Jessica van t Erve

+1 for solving this. Even with the workaround it doesn’t actually work.  


Nathan2
  • New Participant
  • August 15, 2025

+1. i would love to have this fixed. lost a chunk of time today figuring this out.


Maciej_Mozejko

Please fix it, we beg you


Marcus_Sjoholm

+1!

Makes no sense for a container with a height set to “hug” to have an height if all children are hidden  😴


Sophie_Riehn
  • New Member
  • October 28, 2025

Keeping this alive, as it is really needed.
My example: Having a tag with various leading items you can activate – like an icon in front of the label or a notification or several other things. Can’t build this component in a clean way as the AF does not collapse.
The hack with the 0 size frame does not fix it as the paddings did not dissapear.


Ryan Pitt
  • New Member
  • November 4, 2025

Basically the same as everyone else, +1 so the thread doesn’t die


itsViney
  • New Member
  • November 14, 2025

+1 From me too. Also would be nice to have a ‘Collapse padding when empty’ toggle


Rafa_Moschen
  • New Member
  • December 4, 2025

Looking for answers here because I am having this issue but a colleague of mine isn’t. Makes me wonder if there is anything I should be doing different.


Seth6
  • New Participant
  • January 14, 2026

I’m also having this issue. Would like to be able to have the frame collapse without having to add anything weird like a third boolean property. It’s limiting the design layout possibilities. Unless I add another variant which is kind of heavy. This is for an enterprise so, the components get kind of big and I want to minimize that if possible.


Seth6
  • New Participant
  • January 14, 2026

Looking for answers here because I am having this issue but a colleague of mine isn’t. Makes me wonder if there is anything I should be doing different.

Why is your colleague not having this issue? I’d like to know if they found a solution.


Julia57
  • Active Member
  • January 19, 2026

Chiming in here again because I just noticed that fixing this issue would also finally make the AL Grid usable!!


Joseph_Niet
  • New Participant
  • March 23, 2026

Yeah this feels broken when working with grids. I have a 3x1 and I want to toggle one of the cells off with a boolean on the visibility of the cell contents. Even though the cell height is set to hug, when it’s empty it seems to fallback to 1fr?

Hack around it: Add a line with 0% opacity within the frame. Then there’s an element for the height to ‘hug’.
 


Apolline
  • Active Member
  • March 31, 2026

Same issue with slots now 


Enisa Kajtazović

+1

 

Collapsing an empty frame to a minimum hight, as well!


Kerry_Johnson
  • Active Member
  • June 15, 2026

You guys already have an “Auto layout settings” panel, you should add a new option “Zero height when empty”.  I would imagine you had to write extra code to prevent this behavior from happening naturally, so add another code path that skips that logic.

 

 


Julia57
  • Active Member
  • June 18, 2026

@Kerry_Johnson agree, but I would argue that it should just be the default. I cant think of any reason why I would want it to be not-zero.


Kerry_Johnson
  • Active Member
  • June 24, 2026

@Kerry_Johnson agree, but I would argue that it should just be the default. I cant think of any reason why I would want it to be not-zero.

Agreed for new layers.


Paulo Cholla
  • New Member
  • August 3, 2026

wow, 3 years and nothing?

i can picture the PMs and C-Levels telling the team to prioritize AI or whatever other features to get new customers instead of keeping the current ones happy. maybe it holds up until the next UI software really focus on solving basic issues their heavy users have


Michael Dralle

Keeping this issue alive until it’s finally fixed. It’s an annoying issue in daily work again and again and again.


Ide idrees
  • New Participant
  • August 8, 2026

Yeah, I can see why this would be confusing. If all the children are hidden, I’d expect the Auto Layout frame to collapse to 0 rather than retain the size of whichever child was hidden last. That behavior seems unintuitive, especially when the frame is being used inside a larger responsive layout.