Do we have any info regarding the limits and performance issues related to the number of variables in a file or in a collection?
I am asking this because I am writing a plugin that allows the user to manipulate frames using tailwind classes (size, autolayout, borders, colors, etc).
In one possible implementation I would end up with a “auto-generated” collection of variables in the houndreds, and it could grow as the plugin is used.
Does anyone know what would be a “big number” of variables in the context of Figma? Maybe we can get and order of measure.
Thanks for reaching out to the community. Can you clarify by “number of variables”? Do you mean number of modes for variables? If so, the number of modes you can create per variable collection depends on your plan: https://help.figma.com/hc/en-us/articles/360040328273 (minimum 4 to 40 modes per collection). Hope this helps!
I am aware of limits on number of modes, including plann limits.
Let me put a bit more context:
I develop a platform to manage Objects and Object attributes (think OOUX like). They also have mock data attached.
I want to provide a way for the designers to be able to consume mock data defiend for any attribute of any object. This way the design mirrors the mock data and everybody can work with the same dataset.
I was looking on creating one variable for each attribute of each object we manage (at least the ones that can be represented as strings).
EX: my object is called User and the user has a firstName and a lastName.
the designer would use the variables mock/User/firstName and mock/User/LastName.
Moivng forwoard, if we go this path, I need to understand how many variables I can have in Figma (variables in use and maybe not is use if this mathers), so I can validate my scaling targets for the platform.
My initial estimations would be in the range of 50-200 objects with an average of 10 attributes each. So I would go into thousands of variables.
As a side note: in my masterplan, I would also use variable modes so I can assign multiple mock string oprions for each attribute. This way the designer can change the mock fast to see renderings with different strings. We are assesing the target first as the free plan would not have this available.
So I am looking specifically at the number of variables in a Figma file.
Hey Sorin, thank you for taking the time to clarify it! To answer your question, you can create up to 5,000 variables per collection. For more details how to manage variables, this guide can be also useful for you: https://help.figma.com/hc/en-us/articles/15145852043927#01H8044A3J5SZNG4MKAW1PQJDS Hope this helps!
a! wow, it was right there in the GUI docs.
You’re welcome, happy to help!