Figma Support Forum

Nested components with variants don't change size with instance of main component

When I change the state of a nested component and If that nested component changes sizes. When I create an instance of that main component, it will not adjust the size, even with auto layout.

Am I doing something wrong? Any help would be appreciated.

See gif:
component not working

It’s difficult to see what is going on in the gif, can you provide a video?

Trying to upload a video. Unable to do it. Here is a larger gif, but a trimmed section. This is showing only the instance of the main component not working.
problem-short

I’ll have rhat same issue, color change works but size don’t. Tried to do icon wrapper.

I figured out the issue. My nested component didn’t have auto-layout applied to it. As soon as I applied auto-layout to the nested component with variants it worked.

Hopefully, this helps others.

Well now I feel dump :smiley: That did it. Sometimes you just lose track of nested components. In this IconWrapper case only hit was that the size was fixed not hug contents

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.