Figma Support Forum

Issues with component resizing

Hi,

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

Update:

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.