Types and scopes
Variables types conversion
Section titled “Variables types conversion”Unlike design tokens, Figma variables support only 6 types — COLOR, BOOLEAN, FLOAT, STRING, TIMING and EASING. So, the plugin converts them into the corresponding types from the DTCG 2025.10 specification.
| Figma type | Scope condition | Design Tokens type |
|---|---|---|
| COLOR | — | color |
| BOOLEAN | — | boolean * |
| FLOAT | only FONT_WEIGHT | fontWeight |
| FLOAT | opacity scopes (no %) | number * |
| FLOAT | opacity scopes (with %) | string (e.g. "10%") * |
| FLOAT | all other scopes | dimension ** |
| STRING | only FONT_WEIGHT | fontWeight |
| STRING | only FONT_FAMILY | fontFamily |
| STRING | all other scopes | string * |
| TIMING | — | duration *** |
| EASING | — | cubicBezier or string **** |
* native JSON types — not part of the closed DTCG 2025.10 type set. The plugin still writes them as the token’s $type. “Opacity scopes” means every scope of the variable is OPACITY or COLOR_OPACITY, see Scopes limitations. Also see this issue.
** Figma currently supports only FLOAT for numeric values used as dimensions, which map to px units. With the DTCG 2025.10 format on, dimensions are exported as { "value": 6, "unit": "px" } objects; otherwise the plugin appends px to the number.
*** Figma stores timings in seconds; the plugin converts them to milliseconds. With the DTCG 2025.10 format on, durations are exported as { "value": 300, "unit": "ms" } objects; otherwise the plugin appends ms to the number.
**** See Motion variables below.
Motion variables
Section titled “Motion variables”Figma’s EASING variables hold either a custom curve or one of Figma’s presets. DTCG only has a cubicBezier type, so the plugin maps them like this:
| Figma easing | Token type | Example value |
|---|---|---|
| Custom bezier | cubicBezier | [0, 0, 0.58, 1] |
| Linear, Ease in / out / in and out, Ease in / out / in and out back | cubicBezier | [0.42, 0, 1, 1] |
| Linear, Ease in / out / in and out, Ease in / out / in and out back — expansion off | string | "ease-in" |
| Gentle, Quick, Bouncy, Slow | string | "gentle" |
| Custom spring | string | "spring(bounce 0.35)" |
| Hold | string | "hold" |
Named bezier presets are expanded into curves unless Expand easing presets to cubic-bezier is turned off. Springs and Hold are always names: DTCG has no spring type, and Figma exposes no numbers for them.
All of these forms are read back on import, so a round trip through the plugin preserves the original preset. Expanded curves are matched back to the preset they came from, and easings exported as strings carry an $extensions.figmaType: "EASING" marker so they are recreated as EASING variables rather than STRING ones.
Design tokens types
Section titled “Design tokens types”In order to validate types, the plugin uses the Design Tokens types.
Scopes limitations
Section titled “Scopes limitations”Figma variables have no font weight, font family or opacity type, so the plugin reads the variable’s scopes to pick the token type:
- A number or string variable whose only scope is
FONT_WEIGHTbecomes afontWeighttoken. With any other scope next to it, it stays adimensionorstring. - A string variable whose only scope is
FONT_FAMILYbecomes afontFamilytoken. With any other scope next to it, it stays astring. - A number variable whose scopes are all
OPACITYorCOLOR_OPACITY(the opacity of a color variable) becomes anumbertoken, or astringwith%if Use percentage for opacity is enabled. With any other scope next to them, it is exported as adimension. Unless scopes are included, such a token carries its scopes in$extensions.figmaScopes, so the import recreates an opacity variable (50, not 0.5).