Skip to content

LightningExperienceSettings

Config key: settings.lightningExperienceSettings

Setup: User Interface → Themes and Branding (/lightning/setup/ThemingAndBranding/home)

Activates a Lightning Experience theme. Although the Metadata API has an activeThemeName field in LightningExperienceSettings, it cannot activate the standard themes like Lightning, LightningLite or SalesforceCosmos.

Screenshot

LightningExperienceSettings

Pill Field
1 activeThemeName

Use cases

Bring back the standard Salesforce theme after a rebranding pilot

During a pilot, the marketing team of Northwind Traders activated the Salesforce Cosmos theme in every sandbox. The pilot is over and each environment must go back to the standard Lightning Blue theme, whose API name is Lightning.

The Metadata API has an activeThemeName field in LightningExperienceSettings, but it can only activate custom themes: a deployment cannot switch an org back to a standard theme such as Lightning, LightningLite or SalesforceCosmos. With this config, the same deployment that ships the metadata restores the theme, and the check mark of the Themes and Branding page moves to the active theme.

{
  "$schema": "https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/main/src/plugins/schema.json",
  "settings": {
    "lightningExperienceSettings": {
      "activeThemeName": "Lightning"
    }
  }
}

Fields

Field Type Description
activeThemeName string The active Lightning Experience Theme
The API Name of the Lightning Experience Theme to be activated
JSON Schema
{
  "type": "object",
  "properties": {
    "activeThemeName": {
      "type": "string",
      "title": "The active Lightning Experience Theme",
      "description": "The API Name of the Lightning Experience Theme to be activated"
    }
  },
  "title": "LightningExperienceSettings",
  "description": "Setup: **User Interface → Themes and Branding** (`/lightning/setup/ThemingAndBranding/home`)\n\nActivates a Lightning Experience theme. Although the Metadata API has an `activeThemeName` field in `LightningExperienceSettings`, it cannot activate the standard themes like `Lightning`, `LightningLite` or `SalesforceCosmos`.\n\n![Themes and Branding](https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/main/src/plugins/lightning-experience-settings/screenshot.webp)",
  "examples": [
    {
      "activeThemeName": "Lightning"
    }
  ]
}

Source code of this setting