Newer Version Available

This content describes an older version of this product. View Latest

Overriding Standard Tokens (Developer Preview)

Standard tokens provide the look-and-feel of the Lightning Design System in your custom components. You can override standard tokens to customize and apply branding to your Lightning apps.

Overriding standard tokens is available as a developer preview. This feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. You can provide feedback and suggestions for this feature on the IdeaExchange.

Note

To override a standard token for your Lightning app, create a tokens bundle with a unique name, for example myOverrides. In the tokens resource, redefine the value for a standard token:
1<aura:tokens>
2    <aura:token name="colorTextBrand" value="#8d7d74"/>
3</aura:tokens>
In your Lightning app, specify the tokens bundle in the tokens attribute:
1<aura:application tokens="c:myOverrides">
2    <!-- Your app markup here -->
3</aura:application>

Token overrides apply across your app, including resources and components provided by Salesforce and components of your own that use tokens.

Packaging apps that use the tokens attribute is unsupported.

Overriding standard token values within defaultTokens.tokens, a required resource in a tokens bundle, is unsupported. If you create a token with the same name as a standard token, it overrides the standard token’s value in some contexts, and has no effect in others. Overrides should only be done in a separate resource as described above.

Important