Skip to main content

Invert boolean variable for layer display


Show first post

36 replies

  • 1 reply
  • July 26, 2024

I’m new to Figma but already run into the need for this after a few days


  • 2 replies
  • July 29, 2024

This is such a basic feature, +1 for this to be implemented!

I am new to Figma, but previously has been using Axure for more than 15 years. I had to switch to Figma due to other reasons, but prototyping abilities of Figma are worse than in Axure 15 years before. Why people tend to call Figma today’s “Standard”?

I am afraid that HyperCard app on original Macintosh in 90’s was more capable 😦


Timo_Karhu1

Example problem:

  • Page has a title with notice label like (fill this form)
  • Page has a notice at the top giving instructions to the user
  • Page has multiple inputs (components) with empty/filled states

Each input sets: X_FILLED = true
Each input has click: if X, Y and Z then PAGE_DONE = true

The additional elements on the page then depend on PAGE_DONE boolean:

  • Hide (fill this) tag in notice color
  • Change color of section title from notice color to regular color (hide + show title)
  • Hide additional filling instructions
  • Show all done instructions

Please input the “Show if false” somehow.


Christian_Franck

That would be helpful for me too. Give more flexibility. Especially when you need to toggle something like either showing a label or an icon. The boolean property “Use Icon” true can then be used for showing the icon and hiding the label. For now I need to hide or show it manually or create a variant for it. This blow up my variants I need to keep maintained. But there are many other use cases for me.


igor.paillard

Single and simple show hide variable ( when I click, if true then false and if false then true)


maria51
  • New Member
  • 1 reply
  • December 18, 2024

Being able to set the Value of Var z depending equal to !Y in Local Variables would already solve this:
so lets say I have a boolean “Show Edit Dialog” and now I want to link the variable “Forbid change” (applied in another comp) to it, so that whenever Show Edit Dialog is true, Changing some other component is forbidden.

Or do I oversee something and this is already possible?

Thank You!

Thank you!


fab4minds
  • New Member
  • 1 reply
  • January 22, 2025

I also use always 2 variables and when I change the value of variable1 I also update “variable2 = not variable1” and vice versa. The 2 variables are not the problem, but always keeping both in sync is very annoying. In the variables panel you can set “variable1 = variable2”, it would be nice if figma would just allow boolean operators in there, so you can set any combination of other boolean variables (e.g. NOT variable1 AND variable3 OR variable 2) as value of another variable.


Direct_Access

Why this feature is desired?

I also encountered this “problem” in Figma. Mainly this feature is required because there are plenty of common situations that would benefit from it. For instance if you create a basic todo-app-ui then a todo is “done” or “not done” for which you likely have two visual appearances that depend on one variable. Sure, there are workarounds, but the workarounds have a lot of downsides, so implementation of the requested feature (show when x is false and hide when x is true) is very much desired.

 

Why two variables for each boolean don't scale

There is the workaround with having a “active” and “inactive” boolean variable. This however does not scale well because:

  • You have to add to variables for one boolean while.. booleans have two states you could benefit from
  • You have to change both variables everytime the situation changes
  • Your list of variables is twice as long and thus finding the right variable is more difficult
  • Your list of variables is twice as long and thus keeping overview over it is mentally harder

 

Why component-variants don't scale

There is the workaround of creating component-variants for the true and false state. That however isn't maintainable either. If there are more variables at play you get a multitude of component variants. For instance if you have 5 booleans, you'd have 2^5 = 32 variants to possibly maintain.


KellyK
  • New Participant
  • 14 replies
  • April 1, 2025

+1, every time I need to build error messages in a prototype, I need an inverse boolean. e.g. if something is false, show the error layer.


Adam Slíva

+1, I’m confused that this isn’t a thing already, as it seems so elementary to me.


Dennis_Harz
  • New Member
  • 2 replies
  • April 11, 2025

 


Reply


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