Skip to main content
Solved

Why are my variants not being inherited?


Steven6

So I have one core component called _Button with some properties and size variants.

I use this component to create a the main Button component with type variants (primary, secondary, flat). The new component inherits Boolean and Text properties, but it does not inherit the size variant property. Why is that? Can this be enabled somehow?

Best answer by Gleb

Do you have the Core button instance in all of the Button component variants?

View original
This topic has been closed for replies.

5 replies

Gleb
  • Power Member
  • 4708 replies
  • November 3, 2023

Search for “Figma exposed properties”


Steven6
  • Author
  • 7 replies
  • November 6, 2023

Thanks. Read it, even the part about if the “Expose Nested instances” is not showing.
Because I know the option should show up in the bottom if I click the + icon.

Note: The option to expose nested instances is available only if a main component:

* already has an exposed nested instance, or
* contains nested instances with component properties applied to it

If you don’t see the **Nested instances** option, try applying a component property to a nested component first.

Both my core component and main component have variants and properties. But only properties from my core component is inherited. So what am I missing?

It should not be this hard to expose properties from nested instance.

image


Gleb
  • Power Member
  • 4708 replies
  • Answer
  • November 6, 2023

Do you have the Core button instance in all of the Button component variants?


Steven6
  • Author
  • 7 replies
  • November 6, 2023

I remade the component and now it shows nested instances.
Unfortunately, size is one thing it can’t inherit… it does but the button does not change size when alternating between small, medium and large.

Do you know why variants can’t change height / width?


Gleb
  • Power Member
  • 4708 replies
  • November 6, 2023

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings