Skip to main content
Question

How to make variants of a component have different sets of property values?


Stefan_Sabadas

Hello,

Let’s say I have a button component with two variants, each variant has the properties: “Type” and “Color”.
Can i make it so that, when instancing the component, if i choose Type 1, the values for Color are “Red” and “Blue”, while if i choose Type 2, the values for Color are “Black” and “White”? As apposed to having Red, Blue, Black and White for both Type 1 and Type 2.

This topic has been closed for comments

3 replies

Luigi_Patricelli

HI,

I have more or less the same problem.
In my case I would like to use a different boolean value for the two variants.
Have you solved it somehow?
Anyone have advice?


Nate_G
  • Power Member
  • 180 replies
  • October 13, 2023

@Stefan_Sabadas There is a way you could accomplish this by adding variants within a variant, but the button label text doesn’t persist when you try to swap Types. There could be another alternative using Modes to swap style and color.

See Example File showing the setup for this along with some Pro’s and Con’s.


Yvette_O
  • New Participant
  • 6 replies
  • January 10, 2024

This is what I’m trying to do, too. Set a boolean to false for 3 of 4 variants and true for the fourth.


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