Back to Plugins
Token Loader

Token Loader

A plugin to load tokens (from StyleDictionary), and convert them in to Local Variables

alias tokenstokensstyle dictionaryimport variablesjson to variableslocal variablesjson

Plugin Preview

Token Loader preview

About this plugin

Generate a `tokens.json` using something like Style Dictionary.


example tokens.json:


[
{
"name": "core/color/black",
"value": "#000000"
},
{
"name": "alias/color/black",
"value": "#000000",
"aliasOf": "core/color/black"
}
]


Typescript types for the tokens:


interface VariableToken {
name: string; // an/example/name
value: unknown;
}

interface AliasToken extends VariableToken {
aliasOf: VariableToken['name'];
}

type Token = VariableToken | AliasToken;


Next, you can drop in that tokens.json on the plugin window to automatically generate tokens.


Note! It will drop unused ones from the collection, and update existing.

Plugin Details

Version5
CreatedJuly 24, 2024
Last UpdatedAugust 21, 2024
CategoryImport & export plugins
CreatorMarvin de Bruin
Stats6 installs, 3 likes
PricingFree

Technical Details

  • API:1.0.0
  • UI:build/ui.js
  • main:build/main.js
  • Document Access:dynamic-page
  • Editor Types:
    figma
  • Allowed Domains:
    • none