How --dxp Styling Hooks Map to Theme Panel Properties
Each declarative property in the Theme panel maps to one or more programmatic --dxp styling hooks. When a user updates a property in the Theme panel, the system automatically updates any Lightning web component that uses the hooks associated with that branding property.
See Color --dxp Styling Hooks for information about other available styling hooks that don’t appear in the Theme panel.
Tip
Images
These Theme panel properties…
…map to these --dxp styling hooks
Site Logo
--dxp-s-site-logo-path --dxp-s-site-logo-url
Browser Icon (Favicon)
No styling hook. To add a favicon in Experience Builder, click Theme | Images and upload the file. After upload, the favicon is added automatically to your site’s browser tab.
The Base Font Family and Base Font Size properties set the font family and font size on the <html> element of your site.
The Base Font Family defaults to Visitor’s Native System Font, and the Font Family for each text element defaults to Use Base Font Family. You can change these settings for any text element, but for the best site performance, minimize the number of font families used in the site.
The Base Font Size properties determine the default desktop and mobile font sizes for your site. When you change the base font size, you proportionally adjust any site elements, such as font sizes or spacing values, whose size is specified with relative units (rem or em).
The design system also provides different levels of text styling for your site. Each level includes several style properties that map to --dxp styling hooks using this format.
1--dxp-s-LEVEL-STYLE
Where LEVEL and STYLE are variables.
In the Headings and Body portion of this table, replace level with these values, as appropriate. For text in buttons, see the Buttons section. For text in forms, see the Forms section.
text-heading-extra-large for Heading 1
text-heading-large for Heading 2
text-heading-medium for Heading 3
text-heading-small for Heading 4
text-heading-extra-small for Heading 5
text-heading-extra-extra-small for Heading 6
body for Paragraph 1
body-small for Paragraph 2
For example, the --dxp styling hook for the Heading 1’s font family is
When you set the base font size for the text on your site (see the Text section), that setting affects the default font size of the text in the buttons on your site. For button colors, see the Button Colors section.
As of Winter ’25, color properties for buttons are on the Theme | Buttons panel.
Primary Buttons
Button State
These Theme panel properties…
…map to these --dxp styling hooks
Default State
Background
--dxp-s-button-color
Default State
Border
--dxp-s-button-border-color
Default State
Text
--dxp-s-button-color-contrast
Hover State
Hover Background
--dxp-s-button-color-hover
Hover State
Hover Border
--dxp-s-button-border-color-hover
Hover State
Hover Text
--dxp-s-button-color-hover-contrast
Focus State
Focus Background
--dxp-s-button-color-focus
Focus State
Focus Border
--dxp-s-button-border-color-focus
Focus State
Focus Text
--dxp-s-button-color-focus-contrast
Secondary Buttons
Button State
These Theme panel properties…
…map to these --dxp styling hooks
Default State
Background
--dxp-s-secondary-button-color
Default State
Border
--dxp-s-secondary-button-border-color
Default State
Text
--dxp-s-secondary-button-text-color
Hover State
Hover Background
--dxp-s-secondary-button-color-hover
Hover State
Hover Border
--dxp-s-secondary-button-border-color-hover
Hover State
Hover Text
--dxp-s-secondary-button-text-color-hover
Focus State
Focus Background
--dxp-s-secondary-button-color-focus
Focus State
Focus Border
--dxp-s-secondary-button-border-color-focus
Focus State
Focus Text
--dxp-s-secondary-button-text-color-focus
Tertiary Buttons
Button State
These Theme panel properties…
…map to these --dxp styling hooks
Default State
Background
--dxp-s-tertiary-button-color
Default State
Border
--dxp-s-tertiary-button-border-color
Default State
Text
--dxp-s-tertiary-button-text-color
Hover State
Hover Background
--dxp-s-tertiary-button-color-hover
Hover State
Hover Border
--dxp-s-tertiary-button-border-color-hover
Hover State
Hover Text
--dxp-s-tertiary-button-text-color-hover
Focus State
Focus Background
--dxp-s-tertiary-button-color-focus
Focus State
Focus Border
--dxp-s-tertiary-button-border-color-focus
Focus State
Focus Text
--dxp-s-tertiary-button-text-color-focus
Forms
Similar to the different levels of text styling available for headings and body text on your site, the design system provides text styles for different parts of a form. In the Field Labels, Input Text, and Caption Text section of this table, replace level with these values, as appropriate.
label for Field Label
text for Input Text
caption-text for Caption
For example, the --dxp styling hook for the Field Label’s font family is