Gå til hovedinnhold

Design Tokens (DTCG) format (.tokens)

The Design Tokens (DTCG) format reads W3C Design Tokens Community Group token files (.tokens / .tokens.json) — the JSON interchange format used by Style Dictionary, Tokens Studio, and similar tooling.

Token values are typed design data (colors, dimensions, font families, aliases), not natural language, so the format extracts only the human-readable $description documentation on tokens and groups as translatable content; every token $value, $type, $extensions, and the surrounding structure passes through untouched. Detection claims the unique .tokens extension and sniffs DTCG content ($value + $type); .tokens.json files resolve to the JSON format by extension unless -f designtokens is given. Round-trip is byte-faithful, inherited from the JSON reader/writer.

IDdesigntokens
SourceBuilt-in
Extensions.tokens
CapabilitiesRead + Write

Parameters

ParameterTypeDefaultDescription
extractDescriptionsbooleantrueExtract $description values (human-readable token and group documentation) as translatable blocks. This is the only natural-language field in DTCG; $value is always a typed design value (colour, dimension, font name, …) and is never extracted. Disable to read the file as fully non-translatable structure.

Configure these parameters interactively and copy the YAML on the Format Reference.

Examples

Disable description extraction

Treat the file as fully non-translatable.

extractDescriptions: false

Processing notes

  • Only $description is extracted; token values and structure are non-translatable passthrough.

  • A token file with no $description yields zero translatable blocks — expected for machine-generated token sets.

← Back to the Format Reference