Can I edit the variables defined in a published library locally?
There is a library file (Say File A) with a collection of local variables defining some string and numbers shown on a component. The component is published (with all variables too)
I added this component to another file, say File B, but when I want to edit those strings and numbers locally in this File B, I can no longer see the these variables, nor editing them.
Seems like I can only edit the published component in the library File A (if I have edit access) and this will change all the instances too.
Can I instead edit it locally, meaning edit the values of these publish variables only in File B?
I am working on building a design system using components, variants, and variables. I noticed that you can publish variables so that other files can access the variables from the library, but you cannot make any adjustment to those variables. Is there a way to fix this or am I missing something?
Here is the scenario. I want to have a field with a label. I want the label to have a text variable for the required field indicator. On project 1 I want to use the word âRequiredâ to indicate required fields but on project 2 I want to use an â*â. I want to use a variable in my design system for the contents of the required indicator so that it can be adjusted across all of the components that have the ability to be required at once when I start the new design.
This same thing would apply to a bunch of other attributes of my design system. What is the point of variables in the design system if you canât adjust them and have it affect all of the things that use them?
I am not referring to mode change. I do see that mode change is possible today. What I really want, and what I think would make variables more usable for large companies who use their design systems for many clients, is the ability to adjust variables on use but have it adjust the default values across the file.
As I said in my post, I want to set a default value for something (as a variable in my design system) and then let the designer change the default value to something else when they use it in their file. This is just like how most code frameworks work. For instance Bootstrap. When you use it, it comes with a base setup for the color for âprimaryâ but then when you use it, you can override the variable for the color âprimaryâ to make it match that specific projectâs color. It makes the design system/framework strong (it defines the base values for optimal/quick use, but allows each implementation to adjust those defaults.
Without this, we would have to just copy our design system from project to project and then adjust and publish more components. This makes design systems project-specific instead of enterprise or team specific. Variables could be the feature that takes the design systems to the next level.
Great, thanks. So you are saying that it isnât possible right now? If not, what is your suggestion on how to implement this? Would I create local variables and go to each component as I use it and override the values?
As a workaround, in order to be able to specify a âdefaultâ variable value in each file that uses that variable, you can set the modes on the fileâs pages. In the previous help center link, thereâs a section on âSwitch modes on a pageâ that will explain this a bit more.
Yea, that wonât work because we already have modes for things like light and dark :(. We would have to multiply modes by how many clients we have, which would be crazy. Also, the projects are unique clients so we couldnât share the designs with everyone every time. Like if we had a mode for Client 1, Client 2, Client 3, we would also have to have a mode for Client 1 - Dark, Client 1 Compressed, Client 1 Light, Client 1 Expanded⌠etc. and that would become way too many. We service hundreds of clients per year
Thanks for the help and suggestions. If you think of some other way, please do let me know.
Exactly. The variables donât work much for us unless we get this. We build design systems that are used by multiple projects and clients. If we canât change things like colors or sizes of border radius, it makes using variables in the system a waste of time a bit.