Skip to main content
Antoine
Active Member
May 19, 2022

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

  • May 19, 2022
  • 128 replies
  • 14210 views

Hi, I’m not sure if this is new since the May update, but I wonder why “empty” (all elements hidden) Auto Layout Frames keep the size of the last hidden child (and I do not mean last in the list, but the last element to have been toggled out of view by the user), making them not-0px high even with nothing in them.

See here a file with a Frame with three hidden rectangle: the Frame keeps the size of the last child rectangle to have been hidden. When adding a 0-px Frame to the AL frame, and toggling this 0-px Frame off last, the container goes 0-px.

In my opinion, empty AL Frames should have a height of 0. What do you think?

Pinned Reply By djv

Hey All, thanks again for your continued feedback, and I finally have an update!

 

As mentioned previously, this is behavior is currently a known feature limitation in Figma. We do not allow Auto layout frames to collapse to 0 when the child layers are hidden, so it is expected that the frame will remain sized as if they were shown.

The team has confirmed that they now have the bandwidth to get this working as expected. In the meantime, they have a temporary solution: Add a visible zero-sized frame. Since the container is then not empty, it will hug to the visible child, which is zero-sized.

 

While I know this may not be the solution you want, please know that we’re getting closer. I’ll be sure to update you all again once we have a more firm timeline on the fix. 

128 replies

Mahdi Rahman
New Member
July 11, 2025

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
New Member
July 18, 2025

+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
AntoineAuthor
Active Member
July 22, 2025

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

Ashley_Presman
New Member
August 11, 2025

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
New Member
August 14, 2025

+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
New Member
September 5, 2025

Please fix it, we beg you

Marcus_Sjoholm
New Member
October 10, 2025

+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