Number Variables in prototyping - Should have an option to respect locally set values and be independent from other instances

I’ve been testing Number Variables with a voting component which can have multiple instances on in a single frame.


Currently I have #Vote Count Default value set to 0.

From a default state, tapping the voting component will increase the value by 1 and set the state to “active”. Tapping from the active state will decrease the value by 1 and set the state to “inactive”.

This works great if I’m using a single instance of the component with no divergence from the value I’ve set in the Local Variable collection.

In my use case, this component is nested in a card which has multiple instances. Interacting with one of the instances will update the #Vote Count value globally.

While I know I can add multiple “mode” values to the collection and set them individually for each instance this seems like an overhead nightmare.

My Suggestions

  1. When using `Set Variable’, Having an option to manipulate a value locally (Per instance) or globally.
  2. When creating a number variable, having the option to set an actual number or a reference variable that can be set locally.
  • For example, I set #Vote Count = x and apply that variable to a text layer, then create an instance and set that layer to 6. Using the logic outline above, tapping from default should give me a value of 7 and tapping again will give me a value of 6 for that specific instance.

This would allow for a more robust variable that side steps management overhead of a predetermined list.


Thanks for the feedback, @Brandon_Paterak!

We’ll pass this onto the team for consideration.

If I understand correctly, I think this problem is also why you can’t (sustainably!) use variables to have independently selected checkboxes in a prototype, is that right? And radio button sets aren’t possible at all.

Would really be good to enable that kind of thing, and I’m surprised it’s only got one vote in 30 days. But I guess the Figma community isn’t really into making anything but pretty basic prototypes, for historical reasons.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.