Skip to main content
Jan 15, 2024 6:32 AM UTC

How to Edit variables code syntax based on current mode

When I edit code syntax for variables, I want to set default value based on the current layer
For Example, I have a blue-1 variable, when I change to dev mode, I want this code syntax change to:

  • var(blue-1, #e6f4ff) for Light mode;
  • var(blue-1, #111a2c) for Dark mode
    How I can achieve this ? Is there any api to get the current mode value ? Thanks

2 replies

George_B1
New Participant
Aug 3, 2024 6:34 AM UTC

Hey, found an answer to this issue?
The more I explore Variables, the more I see that Figma dropped the ball on this feature, which is very limited.

y_toku
Figmate
Community Support
Aug 6, 2024 1:15 AM UTC

Hi all,

Thanks for the great feedback! Unfortunately, this feature isn’t available at the moment. I’ll move the category to “Share an Idea” so we can see how much community support it gets.

Thanks,
Toku