I want to create properties to hide/show layers inside a Component but the problem is when I set these properties to false the auto layout doesn’t shrink, it appears like it’s set to fixed size.
Did you make sure that you don’t have a conflict where the parent (blue container) would have its height set at hug while the remaining children are set at fill (which will result by an overriding of Figma to the parent’s height at fixed)
If all your children have their height set at hug or to a fixed value it should work just fine
Otherwise, are you able to share the structure of your component so we can help you better?
According to your last sharing, when you toggle off properties show text and show buttonyou left an empty auto-layout frameCover. Note that when you hide an element in an auto-layout frame, with a height set to hug, the frame will just keep it size.
You can either
remove the Cover frame so your structure will looks like this :
logo
Text
Button
or add another property (e.g show cover) which can display/hide the whole frame
Thank you so much for your help it seems there is bug in Figma when I tried to hide cover layer it leaves behind this weird box, although it’s not affecting the ui but it’s visible as I shown before