Tokens

Token types

The map of all 39 SXL Studio token types: how they are grouped in the create menu, what each becomes in Figma, which export switch owns it, the value shape and aliases.

SXL Studio supports 39 token types. The type is set by the $type field; on export a token becomes a Figma variable, a Figma style, or stays internal: such tokens take part in Apply, composition generation and code, but are not exported to Figma themselves.

Export targetTypesWhat it becomes
Figma variable20A variable in a collection: Color, Number, String, Boolean, Timing or Easing
Figma style10A local style: Paint, Effect, Text or Grid
Internal9Used by the plugin and code, never reaches Figma

Pick the type by what you want in Figma: a reusable variable for colours, sizes, strings and flags, a shared style for gradients, shadows, typography and grids, or an internal contract for borders, transitions, compositions and arbitrary data.

How to create a token

In the visual editor of a file, above the token list, there is a type bar: Color, Gradient, Images, Fill, Opacity, Dimension and a + button with all other types. The + menu is grouped into seven sections and has a type search.

The Add token menu: the Styles, Dimension, Borders groups and the start of Effects.

The Effects and Typography groups.

The Animation and Other groups.

Every type opens its own form: name, value with a format hint, description, and for variables also scopes, code syntax and the Hide from publishing flag. Details for every group are on its page.

Export targets

TargetTypes
Color variablecolor
Number variableopacity, dimension, number, spacing, sizing, borderWidth, borderRadius, fontSize, lineHeight, letterSpacing, paragraphIndent, paragraphSpacing
String variablefontFamily, fontWeight, text
Boolean variableboolean
Timing variableduration
Easing variablecubicBezier, easing
Paint stylegradient, img, fill
Effect styleshadow, backdrop-blur, blur, glass, effects
Text styletypography
Grid stylegrid
Internalborder, strokeStyle, fontStyle, textCase, textDecoration, transition, template, composition, custom

Which export switch owns a type

In the Export to Figma window types are enabled in groups. If a type does not export, check the matching switch.

SwitchTypes
Variables → Colorcolor
Variables → Numberall Number variable types from the table above
Variables → StringfontFamily, fontWeight, text
Variables → Booleanboolean
Variables → Timingduration
Variables → EasingcubicBezier, easing
Styles → Typographytypography
Styles → Shadowshadow
Styles → Blurblur, backdrop-blur
Styles → Effectseffects
Styles → Glassglass
Styles → Fillfill, img
Styles → Gradientgradient
Styles → Gridgrid

Types by group

The seven groups of the Add token menu. Every row shows a minimal $value example.

Styles

$typeExported as$value example
colorColor variable"#635BFF"
gradientPaint style"linear-gradient(90deg, #635BFF, #A78BFA)"
imgPaint style"url(https://…/cover.png)"
fillPaint style[{ "type": "solid", "color": "#635BFF" }]
opacityNumber variable0.6 or "60%"

Dimension

$typeExported as$value example
dimensionNumber variable"16px"
numberNumber variable8
spacingNumber variable"16px"
sizingNumber variable"240px"

Borders

$typeExported as$value example
borderInternal{ "color": "#E7EAF1", "width": "1px", "style": "solid" }
borderWidthNumber variable"1px"
borderRadiusNumber variable"8px"
strokeStyleInternal{ "style": "dashed", "dash": 4, "gap": 4 }

Effects

$typeExported as$value example
shadowEffect style[{ "offsetX": 0, "offsetY": 2, "blur": 8, "color": "#00000033" }]
backdrop-blurEffect style"8px"
blurEffect style"4px"
glassEffect style{ "lightIntensity": 0.3, "refraction": 0.2, "depth": 12, "radius": 8 }
effectsEffect style[{ "type": "DROP_SHADOW", "offsetX": 0, "offsetY": 2, "blur": 8, "color": "#00000033" }]

Typography

$typeExported as$value example
typographyText style{ "fontFamily": "Inter", "fontSize": "16px", "fontWeight": 500, "lineHeight": 1.5 }
fontFamilyString variable"Inter"
fontWeightString variable500 or "Semi Bold"
fontSizeNumber variable"16px"
lineHeightNumber variable"24px"
letterSpacingNumber variable"0.5px"
paragraphIndentNumber variable"8px"
paragraphSpacingNumber variable"12px"
textCaseInternal"uppercase"
textDecorationInternal"underline"
fontStyleInternal"italic". Temporarily hidden from the create menu, still supported in JSON

Animation

$typeExported as$value example
transitionInternal{ "duration": "200ms", "delay": "0ms", "easing": "ease-out" }
durationTiming variable"200ms"
cubicBezierEasing variable[0.4, 0, 0.2, 1]
easingEasing variable"ease-out", "spring(0.3)"

Other

$typeExported as$value example
gridGrid style{ "pattern": "grid", "sectionSize": 8 }
booleanBoolean variabletrue
textString variable"Checkout"
templateInternalan object describing template styles
compositionInternalan object describing a component
customInternal or by value shapeany JSON

A custom token, like any unknown $type, stays editable. On export the plugin looks at the value shape: a HEX colour becomes a Color variable, a number or math a Number variable, true/false a Boolean variable, a string a String variable, and an object that looks like typography, a shadow, a gradient or a grid becomes the matching style. A value that resembles nothing stays in JSON and is not exported to Figma; the plugin reports it in the export result.

Composite value examples

Typography:

JSON
{
  "$type": "typography",
  "$value": { "fontFamily": "Inter", "fontSize": "16px", "fontWeight": 500, "lineHeight": 1.5, "letterSpacing": "0px" }
}

Shadow with several layers:

JSON
{
  "$type": "shadow",
  "$value": [
    { "offsetX": 0, "offsetY": 1, "blur": 2, "spread": 0, "color": "#0000001F" },
    { "offsetX": 0, "offsetY": 8, "blur": 24, "spread": 0, "color": "#00000029" }
  ]
}

Gradient:

JSON
{ "$type": "gradient", "$value": "linear-gradient(135deg, #635BFF 0%, #A78BFA 100%)" }

Grid:

JSON
{ "$type": "grid", "$value": { "pattern": "grid", "sectionSize": 8 } }

Fill with several layers:

JSON
{
  "$type": "fill",
  "$value": [
    { "type": "image", "url": "https://…/photo.jpg", "scaleMode": "FILL", "opacity": 0.7 },
    { "type": "solid", "color": "#00000029" }
  ]
}

Default scopes

Variables get a default Figma scope; you can change it in the token form or through figma.scopes. Variable types not listed in the table get all scopes. boolean, duration, cubicBezier and easing have no scopes at all.

$typeDefault scope
colorAll fills, Stroke color, Effect color
sizingWidth and height
spacingGap
borderRadiusCorner radius
borderWidthStroke width
opacityOpacity
fontFamilyFont family
fontWeightFont style. Other scopes are not allowed for this type
fontSizeFont size
lineHeightLine height
letterSpacingLetter spacing
paragraphSpacingParagraph spacing
paragraphIndentParagraph indent
dimension, number, textAll scopes
boolean, duration, cubicBezier, easingScopes not supported

More: Scopes and Code Syntax.

Inheritance and type aliases

A group can declare $type once; every token inside inherits it:

JSON
{
  "spacing": {
    "$type": "spacing",
    "sm": { "$value": "8px" },
    "md": { "$value": "16px" }
  }
}

Legacy and alternative type names are mapped to the canonical ones:

In the fileCanonical type
stringtext
sizesizing
spacespacing
fontSizes, fontWeights, fontStyles and other plural formsfontSize, fontWeight, fontStyle
borderRadiiborderRadius
boxShadowshadow
backgroundBlur, backdropBlur, background-blurbackdrop-blur
layerBlurblur
motionEasingeasing

Use the canonical names in production files. The full table is on the Token JSON format page.

Group pages