Skip to main content
mmarotto
December 20, 2023
Solved

Issue with nested variants not working in cloned component

Hello Figma community,

I hope you’re all doing well. I’m encountering an issue with nested variants in Figma, and I’m seeking assistance to understand and resolve the problem.

I have a master component that includes a “table” component with various variants, each having different fixed widths. When I add this “table” component to the master, changing the variant correctly adjusts the width as expected.

However, when I clone the master component and expose the nested properties of the “table” component, changing the variant doesn’t seem to affect the width in the cloned instance. Oddly, other properties, like color or border radius, work as expected.

For clarification I included a video

Could someone from the community confirm whether this behavior is expected, or if there’s a known workaround to achieve the desired result?

This topic has been closed for replies.
tank666
tank666Solution
December 20, 2023

This is expected behavior. To fix this, your object must be set to “Hug”. You can see an example here: Resizing an instance with variants - #4 by tank666.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank

2 replies

tank666
tank666Solution
December 20, 2023

This is expected behavior. To fix this, your object must be set to “Hug”. You can see an example here: Resizing an instance with variants - #4 by tank666.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
mmarotto
mmarottoAuthor
December 20, 2023

Thanks Tank!

That works with the addition that you have to create an object in that variant that is fixed, so the variant itself can be “hugged”