Token types
Complete map of all 38 SXL Studio token types: what each exports to in Figma, value shape, JSON examples, default scopes, and aliases.
Overview
SXL Studio supports 38 canonical token types. Each type is declared with $type (DTCG and legacy aliases are normalized automatically) and, on export, becomes a Figma variable, a Figma style, or stays internal (used by Apply / Generate / Code, not exported on its own).
| Export target | Count | What it becomes |
|---|---|---|
| Figma variable | 17 | A variable in a collection (COLOR / FLOAT / STRING / BOOLEAN) |
| Figma style | 10 | A local style (Paint / Effect / Text / Grid) |
| Internal / editable | 11 | Plugin-only logic or render; not exported directly |
Key idea Pick the type by what you want in Figma: a reusable variable (colors, sizes, flags), a shared style (gradients, shadows, typography, grids), or an internal contract (border, animation, composition, custom).
Export targets
| Target | Types |
|---|---|
Variable — COLOR | color |
Variable — FLOAT | opacity, dimension, number, spacing, sizing, borderWidth, borderRadius, fontSize, lineHeight, letterSpacing, paragraphIndent, paragraphSpacing |
Variable — STRING | fontFamily, fontWeight, text |
Variable — BOOLEAN | boolean |
| Style — Paint | gradient, img, fill |
| Style — Effect | shadow, backdrop-blur, blur, glass, effects |
| Style — Text | typography |
| Style — Grid | grid |
| Internal / editable | border, strokeStyle, fontStyle, textCase, textDecoration, transition, duration, cubicBezier, template, composition, custom |
Token types by group
These are the seven groups in the Create token menu. Each row shows what the type exports to and a minimal $value example.
Styles
$type | Exports as | Example $value |
|---|---|---|
color | Variable (COLOR) | "#635BFF" or { "r": 0.4, "g": 0.36, "b": 1 } |
gradient | Paint style | "linear-gradient(90deg, #635BFF, #A78BFA)" |
img | Paint style | "url(https://…/cover.png)" |
fill | Paint style | [{ "type": "solid", "color": "#635BFF" }] |
opacity | Variable (FLOAT) | 0.6 |
Dimension
$type | Exports as | Example $value |
|---|---|---|
dimension | Variable (FLOAT) | "16px" |
number | Variable (FLOAT) | 8 |
spacing | Variable (FLOAT) | "16px" |
sizing | Variable (FLOAT) | "240px" |
Borders
$type | Exports as | Example $value |
|---|---|---|
border | Internal | { "color": "#E7EAF1", "width": "1px", "style": "solid" } |
borderWidth | Variable (FLOAT) | "1px" |
borderRadius | Variable (FLOAT) | "8px" |
strokeStyle | Internal | { "dashPattern": [4, 4] } |
Effects
$type | Exports as | Example $value |
|---|---|---|
shadow | Effect style | [{ "offsetX": 0, "offsetY": 2, "blur": 8, "color": "#00000033" }] |
backdrop-blur | Effect style | "8px" |
blur | Effect style | "4px" |
glass | Effect style | { "blur": 12, "opacity": 0.6 } |
effects | Effect style | [{ "type": "DROP_SHADOW", "x": 0, "y": 2, "blur": 8, "color": "#00000033" }] |
Typography
$type | Exports as | Example $value |
|---|---|---|
typography | Text style | { "fontFamily": "Inter", "fontSize": "16px", "fontWeight": 500, "lineHeight": "24px" } |
fontFamily | Variable (STRING) | "Inter" |
fontWeight | Variable (STRING) | 500 |
fontStyle | Internal | "italic" |
fontSize | Variable (FLOAT) | "16px" |
lineHeight | Variable (FLOAT) | "24px" |
letterSpacing | Variable (FLOAT) | "0.5px" |
paragraphIndent | Variable (FLOAT) | "8px" |
paragraphSpacing | Variable (FLOAT) | "12px" |
textCase | Internal | "uppercase" |
textDecoration | Internal | "underline" |
Animation
$type | Exports as | Example $value |
|---|---|---|
transition | Internal | "on-hover smart-animate 200ms ease-out" |
duration | Internal | "200ms" |
cubicBezier | Internal | "[0.4, 0, 0.2, 1]" |
Other
$type | Exports as | Example $value |
|---|---|---|
grid | Grid style | { "pattern": "grid", "sectionSize": 8 } |
boolean | Variable (BOOLEAN) | true |
text | Variable (STRING) | "Checkout" |
template | Internal | template definition object |
composition | Internal | composition definition object |
custom | Internal (or inferred) | any JSON value |
Note custom (or a clean project-specific $type such as "baseUnit") stays editable. On export, SXL infers a safe target from the $value shape (#112233 → color, numbers → number, booleans → boolean, CSS gradients → paint); values it cannot infer safely stay opaque.
Composite value examples
Object and array types are the ones worth seeing in full.
Typography:
{
"$type": "typography",
"$value": { "fontFamily": "Inter", "fontSize": "16px", "fontWeight": 500, "lineHeight": "24px", "letterSpacing": "0px" }
}
Shadow (array of layers):
{
"$type": "shadow",
"$value": [
{ "offsetX": 0, "offsetY": 1, "blur": 2, "spread": 0, "color": "#0000001F" },
{ "offsetX": 0, "offsetY": 8, "blur": 24, "spread": 0, "color": "#00000029" }
]
}
Gradient:
{ "$type": "gradient", "$value": "linear-gradient(135deg, #635BFF 0%, #A78BFA 100%)" }
Grid:
{ "$type": "grid", "$value": { "pattern": "grid", "sectionSize": 8, "alignment": "STRETCH" } }
Fill (multi-layer):
{
"$type": "fill",
"$value": [
{ "type": "image", "url": "https://…/photo.jpg", "scaleMode": "FILL", "opacity": 0.7 },
{ "type": "solid", "color": "#00000029" }
]
}
Default scopes
Simple variable types get a sensible Figma scope by default (you can override it with figma.scopes). Types not listed default to ALL_SCOPES.
$type | Default scope |
|---|---|
color | ALL_FILLS, STROKE_COLOR, EFFECT_COLOR |
sizing | WIDTH_HEIGHT |
spacing | GAP |
borderRadius | CORNER_RADIUS |
borderWidth | STROKE_FLOAT |
opacity | OPACITY |
fontFamily | FONT_FAMILY |
fontWeight | FONT_STYLE |
fontSize | FONT_SIZE |
lineHeight | LINE_HEIGHT |
letterSpacing | LETTER_SPACING |
paragraphSpacing | PARAGRAPH_SPACING |
paragraphIndent | PARAGRAPH_INDENT |
dimension, number, text, boolean | ALL_SCOPES |
Full scope behavior and filtering: Scopes & Code Syntax.
Inheritance and aliases
A group can declare $type once; every child token inherits it.
{
"spacing": {
"$type": "spacing",
"sm": { "$value": "8px" },
"md": { "$value": "16px" }
}
}
Legacy and plural $type values are normalized to the canonical key:
Raw $type | Canonical |
|---|---|
string | text |
size | sizing |
space | spacing |
fontSizes / fontWeights / fontStyles … | fontSize / fontWeight / fontStyle |
borderRadii | borderRadius |
boxShadow | shadow |
backgroundBlur / backdropBlur / background-blur | backdrop-blur |
layerBlur | blur |
Prefer canonical names in production files. The full table lives on Token JSON format.
Related pages
- Token JSON format — how to write valid token JSON
- Color, Gradient, Image, Fill, Opacity
- Dimension, Number, Sizing, Spacing
- Border, Border Width, Border Radius, Stroke Style
- Typography and text tokens
- Shadow, Blur, Glass, Effects
- Duration, Cubic Bezier, Transition
- String, Boolean, Grid, Template, Custom
- Composition — structure, props, styles
- Scopes & Code Syntax