Last updated
Was this helpful?
Last updated
Was this helpful?
Text Tokens define entire strings of text that change the written copy of your designs when applied to a text layer.
Text Tokens define the written content in your designs and can be applied to text elements.
Useful for:
UX writing
Creating themes for different languages
Capturing translations
When your product or brand names are still being iterated on
Text Token can have any combination of alpha-numeric values and may include emojis.
Known Issue
Text Tokens with values that are numeric only are not applying as expected.
Hard-coded values of Text Token would be a string of text you define directly.
For example, a Text Token named welcome.message
with the hard-coded value of:
When trying to reference another Token as the Value for a Text Token, you will see Tokens in the dropdown list that are:
Living in Token Sets that are currently active.
In the left menu on the plugin's Tokens page, a checkmark is visible next to the Token Set name.
Token Type is compatible:
The same = text
Nested references
Text Tokens can also reference another Token nested somewhere within the value.
For example, a Text Token with a Name of customer-id
with the hard-coded value of:
When referenced within the value of another Text Token with a Name of app.home-page.title
:
Which would inherit the text content from the customer-id
token and have a resolved value of :
This is a great way to communicate to engineers the design decision to have text content; in this case, the client name comes from a database.
You could even add some notes in the Description of the Token for engineers, like "show the preferred name as the client ID if it exists in the database."
You can apply a Text Token to change the written content of a text layer in Figma when the Token is applied.
With one or more text layers selected in Figma, click on the name of your chosen Text Token in the Plugin to apply its value instantly.
For example, if you select the bounding box that a text layer is in by mistake, the Token is applied to the parent frame and no changes will be made to the text layer as it is a child.
Text is not yet an official token type in the W3C DTCG specifications. Tokens Studio has added Text as an unofficial Token Type to support Figma's String Variable.
When transforming Text Tokens, there are specific transforms to be aware of.
The preprocessor in the SD-Transforms package will automatically convert the Tokens Studio specific Token Type of text
to align with the Style Dictionary compatible Token Type of content
.
Mentioned in this doc:
Style Dictionary - https://styledictionary.com/
None yet!
When the value is purely numeric, results are unexpected.
None
→
SD-Transforms -
Design Tokens Community Group -
Design Tokens Community Group -
Tokens Studio Plugin GitHub -
Unable to Assign a Numeric Value in the Text Token Type
Once a Token has been applied, it will remain attached until you manually remove it.
However, like all Token Types, you can "force" a reference by manually entering the Token Name between curly brackets.
For example {token.name.here}
Jump to the guide on Token Values with References by selecting the card below to learn more.
Engineers typically transform Tokens used in code with , which is tool-agnostic. Tokens coming from Tokens Studio require an additional step: , an npm package that prepares Tokens for Style Dictionary.
💡 Something to share?
🐞 If you are experiencing an issue not listed here, please reach out to us on the Troubleshooting channel of our , , or send us an email support@tokens.studio
💌 Visit to contribute or subscribe to updates.