Skip to main content
Ashutosh Verma
New Member
January 15, 2025
Solved

Extracting mode name from figma API

  • January 15, 2025
  • 1 reply
  • 76 views

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?

This topic has been closed for replies.
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

 

1 reply

tank666
tank666Answer
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

 

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank