Skip to main content
Question

Trigger component variants based on variable state

  • June 29, 2023
  • 1 reply
  • 2790 views

Michael_Persson

Hello,

I am trying to create a primitive “event listener” component state-based system as follows:

Variant 1 and Variant 2 loops in between each other with a “After delay” conditional to check a boolean state, which if true changes to Variant 3, which has a longer delay, and then sets the boolean to false and switches back to the Variant 1-2 loop. I have a button in the prototype bound to set the boolean to true. The purpose of this functionality is to handle toast visibility/animations in an easily reusable component that will continuously look for state changes in the boolean.

My intuition tells me that this should work, but Figma won’t let me select the variants in the Change to-action inside a conditional, even though they exist in the list and aren’t grayed or crossed out.

Does anyone know why?

This topic has been closed for replies.

1 reply

Celine_
Figmate
  • Community Support
  • 3555 replies
  • August 28, 2023

3 posts were merged into an existing topic: ‘Change to’ with conditional action not working


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