LightningExperienceTheme

Represents the details of a custom theme, including the BrandingSet. Themes enable admins to specify configurable attributes, such as three colors and five images. The colors and some of the images override SLDS token values and influence the generation of app.css.

To activate a custom theme with Metadata API, set the activeThemeField on the LightningExperienceSettings component to the API name of the LightningExperienceTheme.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

File Suffix and Directory Location

LightningExperienceTheme components have the suffix .lightningExperienceTheme and are stored in the lightningExperienceThemes folder.

Version

LightningExperienceTheme components are available in API version 42.0 and later.

Special Access Rules

The LightningExperieceTheme type is available when the S1DesktopAllowed permission is enabled in your org.

Fields

Field Name Field Type Description
defaultBrandingSet string Required. The ID of the BrandingSet properties associated with this LightningExperienceTheme.
description string The optional description text of this LightningExperienceTheme. Limited to 1000 characters.
designSystemVersion LightningDesignSystemVersion (enumeration of type string) Represents the version of Salesforce Lightning Design System (SLDS) on which the theme is built.

Valid values are:

  • SLDS_v1
  • SLDS_v2

If you don’t define a value, the default value is SLDS_v1.

Available in API version 64.0 and later.

isDarkModeEnabled (beta) boolean Indicates whether individual users can enable dark mode (true) or not (false) for this LightningExperienceTheme. The default value is false. Available for custom SLDS 2 themes in select editions. See Salesforce Cosmos Theme and SLDS 2 Availability. Available in API version 65.0 and later.

Dark mode is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.

Note

masterLabel string Required. The label for this LightningExperienceTheme, which displays in Setup. Limited to 70 characters.
shouldOverrideLoadingImage boolean If true, the LightningExperienceTheme overrides the splash screen image.

Declarative Metadata Sample Definition

The following is an example of a LightningExperienceTheme component. See BrandingSet for an example of the BrandingSet component.

1<?xml version="1.0" encoding="UTF-8"?>
2<LightningExperienceTheme xmlns="http://soap.sforce.com/2006/04/metadata">
3    <defaultBrandingSet>SummerCelebrationBrand</defaultBrandingSet>
4    <description>Theme for summer celebration week.</description>
5    <masterLabel>Summer Celebration</masterLabel>
6    <shouldOverrideLoadingImage>false</shouldOverrideLoadingImage>
7</LightningExperienceTheme>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>LEXTHEMINGThemeName</members>
5        <name>BrandingSet</name>
6    </types>
7    <types>
8    	<members>Summer Celebration</members>
9    	<name>LightningExperienceTheme</name>
10    </types>
11    <version>42.0</version>
12</Package>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.