Istance behave not like it's main component

I tried a lot of things and i’m going to be crazy.

I created this component:
image

The icon inside the button is itself a component with multiple icon variants. If i switch the variant inside the main component to change the icon everything is going ok:

Now if i create an instance of the same component and try to do the same, here is what happens:

Is there anyone that can help me to understand what’s wrong?

Here is also a link to a Figma example file to see layer structure:

Kind Regards.
Bart

Hi @MonRyse,Thank you for reaching out about this. We’re grateful that you shared the design file with us – it’s truly helpful.

I noticed that the “Horizontal Option” component set has nested instance named “Items Icon” as you mentioned.

If you switch to a different variant of the “Items Icon” nested within the “Horizontal Option” instance and the switched variant of that instance is not resizing correctly, then it could be related to a long-standing bug.

Meanwhile, if you add auto layout to each state of your set and assign the correct constraints you should be able to swap and see your frames correctly resize.
So, could you please try explore auto layout setting to fix the issue? You can check the instruction here: Explore auto layout properties

Where elements are stacked on top of one another you’ll need to apply Ignore auto layout to the element sitting on top.

If the above is not resolve the nested instance resizing issue, I recommend submit a bug report for further investigation: https://help.figma.com/hc/en-us/requests/new?ticket_form_id=360001744374
When you submit, kindly provide the following details for a thorough investigation:

  • Use the email associated with your Figma account.
  • Share direct links to the file, and grant “can edit” permissions to support-share@figma.com (this will not affect your billing).
  • Recording or Screenshots of the issue, capturing the full Figma screen with the left and right-hand panels

Thanks for your assistance and understanding. If I overlooked anything, please let us know.
If any other members of our community have additional insights or recommendations, please feel free to share here.

Thank again for reaching out.