Create a Tokens Bundle

Create a tokens bundle in your org using the Developer Console.

Salesforce recommends that you use Styling Hooks instead of design tokens if possible. While existing design tokens still work, styling hooks are the future of customization for Lightning web components and Aura components. See Replace Design Tokens with Styling Hooks.

Important

To create a tokens bundle:

  1. In the Developer Console, select File | New | Lightning Tokens.
  2. Enter a name for the tokens bundle.
    Your first tokens bundle should be named defaultTokens. The tokens defined within defaultTokens are automatically accessible in your Lightning components. Tokens defined in any other bundle won’t be accessible in your components unless you import them into the defaultTokens bundle.
You have an empty tokens bundle, ready to edit.
1<aura:tokens>
2
3</aura:tokens>

You can’t edit the tokens bundle name or description in the Developer Console after you create it. The bundle’s AuraBundleDefinition can be modified using the Metadata API. Although you can set a version on a tokens bundle, doing so has no effect.

Note