Skip to main content
Question

[BUG] Figma 'ran to a problem' when applying action to conditionnal interraction

  • October 4, 2024
  • 1 reply
  • 10 views

Florent8

Hey!

I have 2 variants of a component, one with a black background and the other with a white background.
I want my component to switch background when clicked.
I create a variable Boolean (called ‘Pressed’) and set it to false.
I then add an interraction to my component:
On Drag → If Else → if ‘Pressed’ is False → Change to → and it crash.

i tried on different instances, it keep crashing.

I’m fairly new to Figma, did i do something wrong? Or did i find a bug?

This topic has been closed for replies.

1 reply

Ties
  • New Participant
  • 17 replies
  • October 4, 2024

I use variables for dark and light mode, have you considered setting up colour variables? Because then you can create two modes (thus 2 values for each colour variable), which you can switch between using an interaction. It also saves you a lot of time creating duplicates of components 😃


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