Solving Problems with JavaScript: Variable Code Syntax | Figma

Figma on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateDesign Tool Workflows4 min

About this video

Shows how to run a short JavaScript snippet in Figma's console to set code syntax on every local variable in a collection, mapping variable names to CSS custom properties. It is aimed at designers who already use Figma variables and want to connect them to code.

What you’ll learn

  • Run plugin API code in the Figma JavaScript console
  • Set code syntax for local variables in a collection
  • Map Figma variable names to CSS custom properties