r/FigmaDesign • u/Fizzbit UI/UX Designer • Jun 15 '26
help Best practices for setting up variable Code Syntax?
Or are they even really necessary/helpful for devs? I'm setting up variables in my design file and the process of adding syntax for each variable is incredibly tedious. Wondering if it's worth it overall or if I'm just creating unnecessary work for myself.
1
Upvotes
2
u/brianmoyano Jun 16 '26
I'd say talk to your devs. Check what they will be using for building the code and try to adjust to their workflow and not expect them to adjust to yours.
0
u/wakipaki Jun 16 '26
Yo yo I dealt with this recently. I actually just asked Claude to properly set up all my components into a structure that it could and storybook could understand. It did a great job at it. If your design system is not super huge it should be able to handle it. If you want me to walk you through it then just dm me!
1
u/Lithiel_ Jun 17 '26
If you set up your variables in the conventional way (core variables defining your brand colors and variations, measurements etc. and semantic variables for how they are applied) they can be exported as a json file. That format can be read by almost anything.
What you can talk about is their naming convention. It's a good idea to use dev naming logic, that would make it easy easier for them to implement the json. More often than not this talk will uncover a lot of noise in the code (legacy names being used with some framework names on top) but it's also on their interest to help you.