Skip to main content
adamlunn
March 23, 2021

Conditional Variant Properties

  • March 23, 2021
  • 27 replies
  • 14245 views

Variants have become one of the most important features I use within Figma. They are incredibly powerful! As they are so useful, I find myself looking for the ability to have properties show ONLY when another property is a certain value.

A quick example of what I mean is like this:

Let’s assume you have a button, and the top level of the properties are set up to be Primary and Secondary:

Let’s now assume I have an icon added to my buttons, but they are ONLY available to my Secondary button:

It would be so helpful here if this was possible:

  1. Select “Secondary” as my Property on the button variant.
  2. When “Secondary” is the active Property, I can then see ANOTHER Property where I can choose the icon for this example.
  3. That icon Property is only visible because I have said that it belongs to the “Secondary” Property.

Apologies if I have not explained this very well, but I think this could really be helpful when working with Variants.

27 replies

Gleb
Power Member
March 23, 2021

You can already do that, just delete the unnecessary variant, in your case the secondary button without the icon.

adamlunn
adamlunnAuthor
March 23, 2021

Sorry, it’s hard to explain with text.

In this example, both Primary and Secondary buttons can have no icons, or Secondary buttons can only have an icon.

I was hoping to have one button in my Library, when I drag it onto the canvas, I see the following variant choices:

Status

  • Primary
  • Secondary

I was then hoping that when I select “Secondary”, an additional Variant row appears to choose the icon, if I want one.

Status

  • Primary
  • Secondary - Chosen
    — Icon: Add
Gleb
Power Member
March 23, 2021

Got it, you want the variant value change button to appear or disappear based on the available variants, that makes sense.

Antoine
Active Member
March 30, 2021

Yes please, I’m building a design system for non-designers, and that would be a dream.
Currently I have to create multiple Variants to avoid impossible situations or just leave my user to understand why a certain set of properties is impossible to achieve.

Hide/show of conditionnal properties or even enabled/disabled would solve it.

Lyubomir_Popov
September 10, 2021

Is there a feature request tracker where we can track any progress of something like this? This is an essential feature, I’m surprised to find it is not available.

Andrei_Iancu
September 10, 2021

But this means that you’ll need nested properties for Variants. 🤯

I don’t think the UI of Figma is prepared for such an extension and neither the code behind. 🤔

Looking forward for something like this. 😁

Dave_Soderberg
New Member
September 22, 2021

Glad to see others requesting this! It would avoid those massive matrixes of every possible combination (even the ones you don’t want 🙂)

I can’t begin to imagine how difficult these things are with a massive user base and endless implications to consider.

But as an example, I could see:

  • Allowing nesting of sub-variants
  • Using a pick-whip like prototypes to visualize relationships
  • Visualizing the nested nature of sub-variants

e.g. in this example, the “Tertiary” button has only one content type

Guillaume_BRACHON
New Participant
September 10, 2022

I would love that too, it would be super useful!

September 30, 2022

this would be a good thing to have!

Aman_Goyal
February 9, 2023

Any progress in this feature? Can we do it now somehow? Please help.