Skip to content

Destruct token

What It Does

The Destruct token node breaks down a design token into its individual components. It's useful for accessing specific parts of a token for reference, modification, or creating new tokens.

Inputs

NameDescriptionTypeRequired
TokenThe design token to break downTokenYes

Outputs

NameDescriptionType
NameThe token's identifierText
DescriptionThe token's descriptionText
TypeThe token's type (color, typography, etc.)Text
$extensionsAdditional metadata for the tokenObject
ValueThe token's primitive value (for basic tokens)Text
BorderThe token's border value (for border tokens)Border
TypographyThe token's typography value (for typography tokens)Typography
Box ShadowThe token's box shadow values (for box shadow tokens)List

How to Use It

  1. Drag the Destruct token node into your graph.
  2. Connect a token to the "Token" input.
  3. The node outputs all the individual components of the token.
  4. Only the outputs relevant to the token type will have values.

Tips

  • Not all outputs will contain data - only those relevant to the token type.
  • For references (like {color.primary}), the Value output will contain the reference string.

See Also

  • Create Design Token: For creating new tokens using the extracted components.
  • Extract Single Token: For extracting one token from a collection.

Use Cases

  • Token Modification: Extract, modify, and recreate tokens with updated values.
  • Token Analysis: Examine the structure and properties of existing tokens.
  • Token Transformation: Convert between different token formats or structures.