Swap instances

I have a problem, I have different image components, they have different sizes with boxes created with auto layout and they are nested in other component also using auto layout, by default the image is in S size and when I swap the instance the size they go back to Hero that is the default size of the component, how can I make it keep the same size, the namings are correct, I don’t know what else to check

1 Like

Can’t upload video because apparently I’m new tho I’m not :woman_shrugging:t2:

I have solved for this multiple times by nesting Autolayout containers alternating between Fill and Hug, which often have to be adjusted at the source component level. Whether or not the Autolayout containers need to be adjusted in the instance or the component only the Autolayout Gods know, and they’re clearly not paying attention.

My guess would be that you need to set the instance parent frame to Autlayout with Hug, then put another one inside it with Fill. Then at the component level do the same thing. There are a few YouTube videos that will help you make sense of it for long enough to think it should be easy, but then you’ll be right back to being frustrated. And when you get it a few times, you will think you understand it. But then about an hour later you will get stuck on it again because it won’t seem to work for no logical reason.

Also check that you have the component Autolayout (Fill ) → Autolayout (Hug) to be able to scale vertically and horizontally, and make sure you have the dimensions set to “constrain proportions.”

Autolayout is a huge pain in the ass when it comes to this. It seems like the Figma team doesn’t use Figma to design, or they would have fixed it by now.

1 Like

Hahahahaha thanks! I see we share the frustration, I’ll try tweaking it more!

1 Like

@ksn here we are again!!!