Skip to main content
Bilal5
August 30, 2023
Question

How are developers supposed to access variables?

  • August 30, 2023
  • 14 replies
  • 7165 views

I might be missing something essential here, but I can’t seem to figure out any way for developers (who have view-only, dev mode access) to actually view variables in a file/project/design system?

As far as I can see, they can only inspect single components. So they might see “button-primary-bg” for instance, and a corresponding hex color, in the dev mode side panel. But absolutely nowhere can they actually figure out what “button-primary-bg” is referring to (typically a color primitive, which again refers to a hex code). Not only is the alias not visible in the side panel, but the full list of variables is not accessible in dev mode either, as far as I can see.

I mean, it’s probably okay if you look at the design system as a static thing, where we could do a one-time export of all variables as a .json or something. But design systems are seldom static. New components are being created, and thus new aliases are needed quite often, specially in the early stages of a project. Am I crazy or is this a fairly big omission…?

This topic has been closed for replies.

14 replies

Ognjen1
June 24, 2024

+1 We, as a team, are having same issue. Also, Devs can not switch between light and dark mode. That leave us with only one solution - to duplicate all design files and keeping two duplicate files relevant to changes is even greater pain

Liam_Morris1
June 27, 2024

Thank you for this!!

Zrinka_Z
New Member
August 2, 2024

Still nothing? No reference to primitive variable in dev mode? So I have to keep “cheating” with a mix of variables and styles as it gives better overview of primitives in use! 😮‍💨

image

George_B1
New Participant
August 3, 2024

How do you apply this “hack” if the semantic variable you added the code syntax to is part of a variable with multiple modes with different variables?
the code syntax is applied per variable, not per mode 😦