Cannot get nested component to preserve "Hug"

I have a nested component system, where I swap out inner components for different content. These inner components have different heights.

Every single element in the structure of the components has an Auto-Layout, and they all are set to “Hug” (the height is defined within the innermost-level component). However, when swapping out the content component, its height property is always changed to “Fixed”.

I checked every element, and all of them are set to “Hug”.

Only once I swap the nested component, “Hug” changes to “Fixed”.

It is changed with the swapping of the component, no matter what component I swap in. Manually re-changing the property to “Hug” fixes the issue, and I can from then on swap out the content, and “Hug” works & persists.

4 Likes

I’m having this same problem.

No solve for this yet?

Thought it was just me and something I was doing wrong but does seem like a bug.

I’d rather just be using one component with properties rather than variants for something this dumb. Swapping variants for size is easier than manually changing but won’t be great for future scaling.

I think this bug has been around for years and now I have to undo a bunch of work because it’s not viable. It’s kind of odd that parent components don’t respond to child instances’ sizes, since that’s kind of an important aspect of nesting components.

Can this be fixed, please?

1 Like

Hey All, sorry to hear you’re having trouble with this!

It’s hard to be sure what’s happening without seeing how your files have been set up. Please reach out to the technical quality team directly via this form for help: https://help.figma.com/hc/en-us/requests/new

Be sure tp use your Figma account email, include a link to the file, and share it with support-share@figma.com, so they can take a closer look.