Trigger component variants based on variable state

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?

1 Like

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