Skip to main content

Love variables in Figma!

I’m just wondering if it would be possible to have variables as it is already + within a scope of a component.

Example:

I have a component in which I control its content with variables. For ex. I have a counter of items with + and - buttons to increment or decrement the number (like in a shopping cart or such).

If I have several types of items in my cart, I will have several instances of the counter component. This means all these instances will use the same variable, which is not desirable in that case. I will need to create one variable per instance, otherwise the number will be updated in every instance.


Idea:

Maybe there can be some kind of option to check saying “component-specific variable” that will auto-create variables for each instance and this variable could be named ninstanceName].NvariableName], so if I have a variable “count” and instances called “counter1”, “counter2”, 'counter3" I’ll get variables “counter1.count”, “counter2.count”, “counter3.count” and so on.

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