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

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

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

Version 

Introduced in API version 42.0.

Special Access Rules 

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

Fields 

defaultBrandingSet 

  • Type: string
  • Required: Yes
  • Description: Required. The ID of the BrandingSet properties associated with this LightningExperienceTheme.

description 

  • Type: string
  • Required: No
  • Description: The optional description text of this LightningExperienceTheme. Limited to 1000 characters.

designSystemVersion 

  • Type: LightningDesignSystemVersion (enumeration of type string)

  • Required: No

  • Introduced: API version 64.0

  • Description: Represents the version of Salesforce Lightning Design System (SLDS) on which the theme is built.

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

  • Possible values:

    • SLDS_v1
    • SLDS_v2

isDarkModeEnabled 

  • Type: boolean
  • Required: No
  • Introduced: API version 65.0
  • Description: 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.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required. The label for this LightningExperienceTheme, which displays in Setup. Limited to 70 characters.

shouldOverrideLoadingImage 

  • Type: boolean
  • Required: No
  • Description: 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.