Tokens

Borders

Borders group token types: Border, Border Width, Border Radius, Stroke Style — verified value shapes, keys, and examples.

Overview

$typeExports asValue in one line
borderInternal (applied)Composite object: color + width + style
borderWidthVariable (FLOAT)Number or unit string
borderRadiusVariable (FLOAT)Number or unit string
strokeStyleInternal (applied)Dash/cap/join descriptor (string, object, or array)

border and strokeStyle are applied directly to nodes (they are not exported as a standalone variable or style). borderWidth and borderRadius are plain FLOAT variables.


Border

A composite stroke contract. Partial objects are allowed — the plugin fills in the rest.

KeyType / valuesMeaning
colorcolor string or aliasStroke color
widthnumber / unit string or aliasStroke width
stylesolid, dashed, dotted; none / hidden clears the strokeLine style
strokeAligninside, center, outsideStroke position (aliases: position, borderAlign)
strokeStylealias to a strokeStyle token, or an inline stroke-style object/stringDash pattern + caps/joins
JSON
{
  "border": {
    "$type": "border",
    "default": {
      "$value": { "color": "{color.neutral.300}", "width": "{borderWidth.sm}", "style": "solid", "strokeAlign": "inside" }
    }
  }
}

Dashed border — put the dash details in strokeStyle (inline object or a reference to a strokeStyle token):

JSON
{
  "border": {
    "$type": "border",
    "focus": {
      "$value": {
        "color": "#FF6600",
        "width": "2px",
        "style": "dashed",
        "strokeStyle": { "dash": 6, "gap": 4, "strokeCap": "round" }
      }
    }
  }
}

Border Width

Exported as a FLOAT variable with scope STROKE_FLOAT.

Accepted $valueExample
Number1
Unit string"1px", "0.5rem"
Alias / math"{borderWidth.md}"
JSON
{ "borderWidth": { "$type": "borderWidth", "sm": { "$value": "1px" }, "md": { "$value": "2px" } } }

Border Radius

Exported as a FLOAT variable with scope CORNER_RADIUS.

Accepted $valueExample
Number8
Unit string"8px", "1rem"
Alias / math"{borderRadius.lg} * 2"
JSON
{ "borderRadius": { "$type": "borderRadius", "sm": { "$value": "4px" }, "pill": { "$value": "999px" } } }

Stroke Style

Describes a dash pattern and caps/joins. Applied directly (not a standalone export), and can be referenced from border.strokeStyle.

Accepted $valueExample
Style string"solid", "dashed"
Dash array[4, 4] (dash, gap, …)
Objectsee keys below
Alias"{strokeStyle.dashed}"

Stroke-style object keys:

KeyValues
stylesolid, dashed, dotted
dashDash length (number / string)
gapGap length (number / string)
dashCapCap for the dash
strokeCap / endCapbutt / none, round, square
strokeJoin / joinmiter, bevel, round
JSON
{
  "strokeStyle": {
    "$type": "strokeStyle",
    "dashed": { "$value": { "style": "dashed", "dash": 6, "gap": 4, "strokeCap": "round" } }
  }
}

Full example

JSON
{
  "borderWidth": { "$type": "borderWidth", "sm": { "$value": "1px" }, "md": { "$value": "2px" } },
  "borderRadius": { "$type": "borderRadius", "md": { "$value": "8px" } },
  "border": {
    "$type": "border",
    "default": { "$value": { "color": "{color.neutral.300}", "width": "{borderWidth.sm}", "style": "solid", "strokeAlign": "inside" } },
    "focus": { "$value": { "color": "{color.brand.primary}", "width": "{borderWidth.md}", "style": "dashed", "strokeStyle": { "dash": 6, "gap": 4 } } }
  }
}