token alias
A token whose value is a reference to another token, written in curly braces such as {semantic.action.bg}.
In more detail
Aliases chain the three token tiers together and avoid copying the same value into many places. A resolver follows each reference until it reaches a literal value. It must also detect cycles, where tokens point at each other in a loop, and stop with an error.
Example
"component.btn.primary": { "$value": "{semantic.action.bg}" } resolves through semantic.action.bg to #3b82f6.Related terms
- $value and $type — The two reserved keys in the design token format: $value holds the token's value and $type says what kind of value it is.
- circular dependency — Two or more pieces of code or data that depend on each other in a loop, so none can be built or resolved first.
- semantic token — A token named for its purpose, such as color.action.bg or color.surface, that points at a global token.
Taught in
- Design Tokens: W3C Specs, Global, Semantic & Component Tokens — Design Systems & Component Engineering