Skip to main content
Answer

Extracting mode name from figma API

  • January 15, 2025
  • 1 reply
  • 47 views

Ashutosh Verma

Hello,

I am currently developing a Figma plugin to extract local variables. However, I am facing difficulty in extracting the mode name (which I intend to use for segregating variables based on different modes, such as dark mode and light mode). Could you please advise if there is a method to retrieve the mode name?

Best answer by tank666

Get the VariableCollection object that stores the variables you need and check the value of the modes property.

VariableCollection.modes[i].name

 

This topic has been closed for replies.

1 reply

tank666
  • Answer
  • January 15, 2025

Get the VariableCollection object that stores the variables you need and check the value of the modes property.

VariableCollection.modes[i].name