Applying tokens in Figma
The MDS Tokens 2.0 library uses Figma Variables and Styles to ensure consistency across themes.
When designing in Figma, follow these practices:
Themes
Set the theme (e.g., GX Light, B2B Dark) at the page level to preview the correct values.
Components
Use components straight from the library, as tokens are automatically applied at the component level.
Page layouts and compositions
While not generally intended for direct use, some foundation tokens, such as spacing and typography styles, can be applied directly in page layouts and compositions.
- Use variables for colors, spacing, sizing, and borders.
- Use styles for text and shadow effects.
Applying tokens in code
For guidance on using our tokens in code, refer to these resources:
- Design tokens: Overview of how tokens work across platforms, with setup tips and usage examples using getToken and getSpacingToken.
- Introduction to tokens: A hands-on guide from the Engineering Onboarding Path with implementation tips.
Related pages
For specific guidance on which tokens to use, visit their respective foundation page.