Figma Support Forum

Resizing an instance with variants

Is it possible to use different sized variants to resize variants of components? It works with autolayout in components but does not seem to affect the instance of it. In the pic I created an instance and replaced the space tester with the 32px height one.

I think i know what you mean but I was coming from the other side. how can i use a variant to increase the space in autolayout between headline and text? i would love to choose between different spacers and just swapping the out would increase the space

The answer above completely fixes the issue with resizing a variant in an instance. You can view and duplicate my file:

1 Like

thanks i’ll check it out right away!
weird, it didnt even give me the option to use “hug content”

If 2 variants are of a different size and you set up switching between the variants on click or hover for example, then what happens is that the variant does swap into second, but it’s parent does not adjust autolayout accordingly and assumes the size of the first variant.

1 Like

I am also having the issue with variants not resizing when selecting different variants. For example I have a product tag. There are 5 with different sizes wrapping around the text. If I swop out the small variant for the longer one it does not change the size but keeps the initial variant size. See image attached

Variant Tags Components

Will the variants components pick up the different sizes and change the size accordingly?