Design tokens can be added to Interplay in JSON format. Interplay currently supports 2 formats for this JSON:
The W3C Working group for design tokens has specified a draft token file format that can be found here: Design Tokens Format
The format is a nested JSON structure, with objects containing groups of token values. For example:
{
"parentGroupX": {
"description": "Description of parentGroupX",
"subgroup1": {
"description": "Description of subgroup1",
"tokenA": {
"description": "Description of token A",
"type": "color",
"value": "#000000"
},
"tokenB": {
"description": "Description of token B",
"type": "color",
"value": "#FFFFFF"
}
}
}
}
Summary of format:
value
prop are tokenstokenA
and tokenB
and names of tokensparentGroupX
and subgroup1
are names of groupsdescription,
type
and extensions
attributesname
through the nesting structure, joining the names with dots e.g. parentGroupX.subgroup1.tokenB
You can specify any type
string for your tokens.
Currently the following type
values are recognised as having special meaning in Interplay:
Tokens with the following types can be used to style Frames in Figma using the Interplay plugin:
Tokens with the following types can be used to style text in Figma using the Interplay plugin.
Theme UI format has a similar nested structure, but with certain keys expected at the top level of the JSON object.
You can find details of this spec here: https://theme-ui.com/theme-spec/
When importing the ThemeUI format the top-level keys are treated as groups of tokens, with the token values inside.