How to scale an instance nested in another component?

I have 2 components called ‘card red’ and ‘card blue’, exactly the same size 300x200, only difference is the colour.

I have to use the card inside another component called ‘card+badge’, made of the card itself and a small badge (together in an autolayout); in this component my card is scaled to 240x160.

Now my problems is:
if I change the card from red to blue (component 1 to 2) inside the ‘card+badge’ original component, it’s al fine; if I change them inside and instance of ‘card+badge’, the card size comes back to its originale 300x200, basically breaking my design!

Is there a solution to keep the size of the card 240x160 that I fixed in my ‘card+badge’ component?

Depending on your needs, you need to either enable or disable Hug Contents for nested instances:

I don’t actually consider this a solve. This relates to needing SCALE as a property, so that when we scale a nested component instance, it also applies that Scale Property when swapping to a new instance. Please vote here: Scale as a property

As @Mike_Escoffery has stated, this is not a solution. This allows you to resize the dimensions of the object…NOT scale. If it WAS scaling, it would do so proportionally.

Good point. In this case vote for the topic linked above and add your own ideas to it. Scale as a property This one can be merged or closed. @Josh

1 Like