What Scalar exports
One export is a folder of JSON files in the DTCG 2025.10 format, plus one resolver file that says how they fit together.
The files
Section titled “The files”| File | Holds |
|---|---|
<collection>.tokens.json |
One file per variable collection, named after it in lowercase with hyphens. |
<collection>.<mode>.tokens.json |
For a collection with more than one mode: the tokens whose value changes by mode, one file per mode. Tokens that are the same in every mode stay in <collection>.tokens.json. |
paint-styles.tokens.json, text-styles.tokens.json, effect-styles.tokens.json |
Color and gradient styles, text styles (typography) and shadow styles. Only present if the file has them. |
scalar.resolver.json |
A DTCG 2025.10 resolver document: lists every file, the order to load them in, and which file belongs to which mode. |
So a collection called Theme with Light and Dark modes exports as three files:
theme.tokens.json (shared), theme.light.tokens.json and theme.dark.tokens.json.
Always load the shared file along with a mode’s file. The mode files hold only what changes; the rest of the collection is in the shared file. The resolver lists this for you, which is why the build pages start from it.
The token shape
Section titled “The token shape”Every token carries its own $type. A few things to expect if you’re coming from older token files:
- Colors are objects, not hex strings:
colorSpace,componentsandalpha, plus ahexstring for tools that want one. In a Figma file set to Display P3, colors are exported withcolorSpace: "display-p3", andhexis the closest sRGB color. - Dimensions are objects:
{ "value": 16, "unit": "px" }, not"16px". - Opacity is 0–1 (when the variable has the Opacity scope), font weights are numbers, and line
height in typography is a multiplier (
1.5). - References use DTCG’s
{group.token}form, including across files. - Descriptions from Figma become
$description. - Numbers are rounded to 6 decimal places, and keys are always written in the same order, so an unchanged Figma file exports with zero diff.
Metadata in $extensions
Section titled “Metadata in $extensions”Each token’s $extensions has two kinds of key:
com.figma.*: facts read straight from Figma, unchanged. For examplecom.figma.scopes(the variable’s scopes),com.figma.variableId,com.figma.codeSyntax, and the original name when it had to be changed.ext.scalar: one object with what Scalar worked out or kept on your behalf. For example the variable a line height or font style was bound to, which can’t be a live reference in the value (see Known limitations).
Every key is listed in the Extensions reference. You can ignore both and still
get a correct build. They’re there for tools that want more than
the format carries, such as reading com.figma.scopes to tell text sizes from other sizes on
Android (see Building with Style Dictionary).