Figma Support Forum

Issues with component resizing


I am currently in the process of creating a design system.

I have created some Cards which I have turned into components, which are all linked to the same master component.

I have then created a ‘widget’ component which is a container for instances of the cards. It is designed to display four instances cards.

In order for the instance cards to fit the widget container I had to scaled them down. By hitting ‘K’ and scaling.

However, an issue now arises when I attempt to swap one of the instances cards within the widget for a different variant of card.

The card I swap does not retain the scaled sizing and it’s content breaks out of its frame as it is in its original size.

Could anybody help me out here? Is this issue related to constraints?

Thank you very much for any help


This issue strangely does not occur when swapping instanced cards with the master widget.

However any attempt to swap a card within a instanced widget component triggers the issue.

It would be great if you could provide an example file :slight_smile:
From what I am reading, I think the issue is with overrides and component management.

  1. What if you combine the content and the card and the content as one component? So when you have to replace the instant, the entire card will be replaced rather than just the content. You already have a main (more appropriate word for master) component, so it would be helpful to replace the entire component.

  2. Have you tried auto layout? Currently you manually scaled the component, if I read right. In auto layout that will happen automatically. And the issues you are having with the scaled sizing won’t be there anymore as you don’t actually need to manually scale anything.

I had a similar issue swapping scaled-down icons on a Component Instance, the only solution was to change every constraint to ‘Scale’ on the Main component.

Here’s an example:

I’m facing the same issue while using icons in several elements.
If the icon component (which are made from a main component and then combined for the different sizes in a Variants) is part of an auto-layout component, it will not adapt its size.
I would expect an element set to hug content to adapt to its content if part of an auto-layout.

Added an image to illustrate my issue better.

1 Like

i’m having same issue with icon component resizing incorrectly when change instance. any solve?

Hi @adam_weisman, if you’re using a scaled instance inside a normal frame, setting every layer in your main component to ‘Scale’ should work. :face_with_monocle:

Hi @h_v_b, as far as I understand when you override instances inside components they maintain the original width and height. Only Auto Layout instances can override those properties.

In your example, you could try adding Auto Layout to the S / M / L icon frames, and see if that works. :relieved:

Sorry for not updating my findings.

This is how I’ve done it:

I created an “icon container” which has several variants sizes, set it to auto-layout and Hug Content while the content has a fixed dimensions.
This allows me to use one set of icons, place the container in the design, choose it’s size and update the contained icon to the desired one.

Hope this makes sense-