Creating token aliases
Refer one token value to another.
In Supernova, you can use a token alias to refer one token value to another. For example, if you would like to use semantic naming to indicate how a token should be used, you can create an alias from your core token blue-50 to a semantic token primary. You can even get more granular to communicate the specific application of a token in a component, for example primary-cta-button.
When the value of a token changes, any tokens that have an alias to it will also change. So if you decide to change blue-50, your aliases will also reflect this change.
- Hover or click the token value you would like to create an alias for.
- Click the create alias icon to open the token selection menu.
- Select a token from the available tokens.
- You can reference the same value for multiple aliases.
If no tokens appear in the token select menu, this could mean that there are no tokens in Supernova yet, or that there are no tokens with a matching value (in the case of tokens imported from Figma).
A token cannot link to itself.
- Hover or click the token with an alias you would like to remove.
- Click the remove alias icon to remove the alias.
- The token will be converted back to a raw value.
It is possible to create a token alias that references a token from another data source. All tokens that are available to you will appear in the token selection dialog. If this data source is removed, the references will also be removed.