Back to Plugins
Export local variables to Json

Export local variables to Json

you can export all local variables as json

local variablesjson

Plugin Preview

Export local variables to Json preview

About this plugin

Plugin Overview

This plugin takes Local Variables of Figma and outputs them as a JSON file in Style Dictionary format. This allows design tokens to be efficiently reflected in the code.


Main Functions

1. Get Local Variables

- Color values

- Spacing

- Typography

and other variables are automatically retrieved


2. Maintain hierarchical structure

// Maintain Figma structure (e.g.colors/primary/base) in JSON format
{
"colors": {
"primary": {
"base": {
"$value": "#1a2b3c",
"$type": "color"
}
}
}
}


3. Value Conversion

- Colors: Convert from RGBA to HEX format

- Numbers: Manage decimal precision

- Variable references: Properly resolve aliases


How to Use

1. Launch the plugin in Figma

2. Click the "Export" button

3. Download the generated JSON file


Features

- JSON output compliant with Style Dictionary format

- Simple UI

- Error fallback handling

- Comprehensive validation


Applications

- Design system construction

- Batch management of design tokens

- Synchronization with codebase


This plugin enables seamless bridging between design and code.

Plugin Details

Version2
CreatedAugust 18, 2024
Last UpdatedMarch 20, 2025
CategorySoftware development
CreatorLibra850
Stats15 installs, 1 likes
PricingFree

Technical Details

  • API:1.0.0
  • UI:{"export": "src/ui/html/export.html"}
  • main:code.js
  • Document Access:dynamic-page
  • Editor Types:
    figma
  • Allowed Domains:
    • none