Skip to main content
Michael_Persson
November 21, 2023

Variable change listener interaction

  • November 21, 2023
  • 13 replies
  • 2426 views

Hello!

As mentioned earlier in posts such as Prototype - Interactions - Event listener & ElseIF conditional, it would be really useful to have interactions trigger from variable changes.

Right now, you can already accomplish these by combining conditional statements with the “After delay” interaction, but it is extremely tedious to maintain and demands a lot of janky component work (see example of implementation in video).

Simply having “Listen for change in variable X” as an interaction would be a really powerful tool to create reusable components for advanced prototypes.

13 replies

y_toku
Figmate
Community Support
November 22, 2023

Hi there,

Thank you for providing feedback! I will share this with our internal team. Your input is highly valued, and we will take it into consideration for future enhancements.

Thanks,

Toku

Havard_Hammerstrom
New Member
November 22, 2023

I made a post about this some time ago, but I completely agree. I have also solved this by creating “After delay” components that run constantly. My project is very large, and this results in it being very CPU intensive, and the prototype interaction lag as a result. “Listen for change in variable X” might not be enough, because you might need to listen to several variables. So, it would be better to listen for any change, in any variable. “Listen for change in variables” would solve my needs at least. Aka, OnEvent/EventUpdate.

It is also very tedious not being able to copy and paste elements within an event.

y_toku
Figmate
Community Support
November 24, 2023

Thank you all for the feedback! I passed them along to our internal team. We really appreciate your voice!

Guzman_Iglesias2
March 21, 2024

I support this idea. It would be great to have it.

April 23, 2024

I think what you are trying to achieve here is similar to this other post Change variant of a component from a different component If so, there is an answer inside this post.

Michael_Persson
May 14, 2024

Hello,

No, I don’t think this is the same functionality. Binding a variable change to an action is not the same thing as binding a variable change to an event.

June 25, 2024

I need this too very much!

Dylan_Davis
August 1, 2024

i faked a listener using the hover state on the frame but this does not trigger when deployed onto mobile 😦

August 26, 2024

It is interesting how little this is voted on. It’s one of those things that most designers wouldn’t think to want or know about and are probably okay with recreating the same prototype conditions over and over to each action, while devs have it drilled in their head to keep things DRY and have a concept of listeners so that we only have to write the listener conditions on the targeted element (e.g. undisable the submit button when checkbox 1, 2, and 3 are checked). As both a designer and dev like a lot in the comment probably are, this is hurting my soul, and I think it’d hurt designer souls too once they understand how much cleaner and less tedious this could be (wouldn’t take much, imo).

I think a listener system would be amazing!

Koen_van_Niekerk2
New Participant
December 30, 2024

Great Idea!

I posted something similar. “Driven” variables are updated once a property changes in your design OR prototype (e.g. a width of a window changes). This can be used with conditionals that respond to changes in these “driven” variables to drive things like replacing a desktop nav with a mobile nav (or many other things)