Wix Harmony exposes a set of CSS variables for a site's theme colors, fonts, and component styles.
Reference them in your app's CSS so its appearance follows the site's theme and updates when the site owner changes it.
These variables exist on Harmony sites only. Sites built in Wix Editor or Wix Studio expose a smaller set, listed in Site Theme CSS Variables.
Caution: Verify theme styling on a published page, not on the editor canvas.
In the editor, a custom element renders inside a sandbox that receives a fixed set of values. A variable there can:
On a published page, both Editor React Components and custom elements receive every variable listed here.
Each table groups the variables for one kind of style, and each row is one property of one style.
The Site Brand panel groups the palette and system colors without naming them individually, so those style names follow the variable names instead.
An empty Defaults to entry means the variable follows no other variable. Its value comes from the set the site owner selected, named at the start of each section, and it changes when they edit that set.
For example, changing Heading 1's color repoints --wst-heading-1-color at the color the owner chose, while --wst-heading-2-color keeps following Base 2's color. Reference the variable for the thing you are styling, not the one it follows.
A site's colors fall into three groups: semantic colors named for their use, the palette the site owner picks, and fixed system colors.
Colors named for what they're used for. Prefer these over palette colors, so your app follows the meaning the site owner intended.
| Style name | Property | CSS variable | Defaults to |
|---|---|---|---|
| Primary background | Color | --wst-primary-background-color | --wst-base-1-color |
| Secondary background | Color | --wst-secondary-background-color | --wst-shade-1-color |
| Links and actions | Color | --wst-links-and-actions-color | --wst-accent-1-color |
| Graphics 1 | Color | --wst-graphics-1-color | --wst-base-2-color |
| Graphics 2 | Color | --wst-graphics-2-color | --wst-accent-1-color |
| Disabled | Color | --wst-system-disabled-color | --wst-shade-2-color |
The site owner picks these nine colors, and the rest of the theme takes its colors from them. Use one only when no semantic color fits what you are styling.
These nine come from the site's brand kit, the set of colors and fonts the owner selects in the editor's Site Brand panel. Switching to a different brand kit changes all nine, and everything that derives from them changes with it.
| Style name | Property | CSS variable |
|---|---|---|
| Base 1 | Color | --wst-base-1-color |
| Base 2 | Color | --wst-base-2-color |
| Shade 1 | Color | --wst-shade-1-color |
| Shade 2 | Color | --wst-shade-2-color |
| Shade 3 | Color | --wst-shade-3-color |
| Accent 1 | Color | --wst-accent-1-color |
| Accent 2 | Color | --wst-accent-2-color |
| Accent 3 | Color | --wst-accent-3-color |
| Accent 4 | Color | --wst-accent-4-color |
Fixed values that aren't part of the site's palette.
| Style name | Property | CSS variable | Value |
|---|---|---|---|
| Success | Color | --wst-system-success-color | #489F48 |
| Error | Color | --wst-system-error-color | #D82222 |
| Alert | Color | --wst-system-alert-color | #E98316 |
| Default dark | Color | --wst-system-default-dark-color | #000000 |
| Default light | Color | --wst-system-default-light-color | #ffffff |
Nine text styles. Fonts come from the site's font set, and each color can be changed per style.
| Style name | Property | CSS variable | Defaults to |
|---|---|---|---|
| Heading 1 | Font | --wst-heading-1-font | |
| Heading 1 | Color | --wst-heading-1-color | --wst-base-2-color |
| Heading 2 | Font | --wst-heading-2-font | |
| Heading 2 | Color | --wst-heading-2-color | --wst-base-2-color |
| Heading 3 | Font | --wst-heading-3-font | |
| Heading 3 | Color | --wst-heading-3-color | --wst-base-2-color |
| Heading 4 | Font | --wst-heading-4-font | |
| Heading 4 | Color | --wst-heading-4-color | --wst-base-2-color |
| Heading 5 | Font | --wst-heading-5-font | |
| Heading 5 | Color | --wst-heading-5-color | --wst-base-2-color |
| Heading 6 | Font | --wst-heading-6-font | |
| Heading 6 | Color | --wst-heading-6-color | --wst-base-2-color |
| Paragraph 1 | Font | --wst-paragraph-1-font | |
| Paragraph 1 | Color | --wst-paragraph-1-color | --wst-base-2-color |
| Paragraph 2 | Font | --wst-paragraph-2-font | |
| Paragraph 2 | Color | --wst-paragraph-2-color | --wst-base-2-color |
| Paragraph 3 | Font | --wst-paragraph-3-font | |
| Paragraph 3 | Color | --wst-paragraph-3-color | --wst-base-2-color |
Three button tiers with the same properties. Values come from the site's button set, which the owner can swap or edit. Swapping to another set changes the borders, corner radii and spacing, and the colors keep following the same palette variables.
| Style name | Property | CSS variable | Defaults to |
|---|---|---|---|
| Primary Button | Fill color | --wst-button-primary-background-color | --wst-accent-1-color |
| Primary Button | Border color (left) | --wst-button-primary-border-left-color | --wst-base-2-color |
| Primary Button | Border color (right) | --wst-button-primary-border-right-color | --wst-base-2-color |
| Primary Button | Border color (top) | --wst-button-primary-border-top-color | --wst-base-2-color |
| Primary Button | Border color (bottom) | --wst-button-primary-border-bottom-color | --wst-base-2-color |
| Primary Button | Shadow | --wst-button-primary-box-shadow | |
| Primary Button | Border width (left) | --wst-button-primary-border-left-width | |
| Primary Button | Border width (right) | --wst-button-primary-border-right-width | |
| Primary Button | Border width (top) | --wst-button-primary-border-top-width | |
| Primary Button | Border width (bottom) | --wst-button-primary-border-bottom-width | |
| Primary Button | Border style (left) | --wst-button-primary-border-left-style | |
| Primary Button | Border style (right) | --wst-button-primary-border-right-style | |
| Primary Button | Border style (top) | --wst-button-primary-border-top-style | |
| Primary Button | Border style (bottom) | --wst-button-primary-border-bottom-style | |
| Primary Button | Padding (bottom) | --wst-button-primary-padding-bottom | |
| Primary Button | Padding (top) | --wst-button-primary-padding-top | |
| Primary Button | Padding (left) | --wst-button-primary-padding-left | |
| Primary Button | Padding (right) | --wst-button-primary-padding-right | |
| Primary Button | Corner radius (top left) | --wst-button-primary-border-top-left-radius | |
| Primary Button | Corner radius (top right) | --wst-button-primary-border-top-right-radius | |
| Primary Button | Corner radius (bottom left) | --wst-button-primary-border-bottom-left-radius | |
| Primary Button | Corner radius (bottom right) | --wst-button-primary-border-bottom-right-radius | |
| Primary Button | Horizontal spacing | --wst-button-primary-column-gap | |
| Primary Button | Vertical spacing | --wst-button-primary-row-gap | |
| Primary Button | Text color | --wst-button-primary-color | --wst-base-1-color |
| Primary Button | Text highlight | --wst-button-primary-text-highlight | |
| Primary Button | Text font | --wst-button-primary-font | --wst-paragraph-2-font |
| Primary Button | Letter spacing | --wst-button-primary-letter-spacing | |
| Primary Button | Text decoration | --wst-button-primary-text-decoration | |
| Primary Button | Case | --wst-button-primary-text-transform | |
| Primary Button | Text shadow | --wst-button-primary-text-shadow | |
| Primary Button | Alignment | --wst-button-primary-justify-content | |
| Primary Button | Fill image | --wst-button-primary-background-image | |
| Secondary Button | Fill color | --wst-button-secondary-background-color | --wst-base-1-color |
| Secondary Button | Border color (left) | --wst-button-secondary-border-left-color | --wst-accent-1-color |
| Secondary Button | Border color (right) | --wst-button-secondary-border-right-color | --wst-accent-1-color |
| Secondary Button | Border color (top) | --wst-button-secondary-border-top-color | --wst-accent-1-color |
| Secondary Button | Border color (bottom) | --wst-button-secondary-border-bottom-color | --wst-accent-1-color |
| Secondary Button | Shadow | --wst-button-secondary-box-shadow | |
| Secondary Button | Border width (left) | --wst-button-secondary-border-left-width | |
| Secondary Button | Border width (right) | --wst-button-secondary-border-right-width | |
| Secondary Button | Border width (top) | --wst-button-secondary-border-top-width | |
| Secondary Button | Border width (bottom) | --wst-button-secondary-border-bottom-width | |
| Secondary Button | Border style (left) | --wst-button-secondary-border-left-style | |
| Secondary Button | Border style (right) | --wst-button-secondary-border-right-style | |
| Secondary Button | Border style (top) | --wst-button-secondary-border-top-style | |
| Secondary Button | Border style (bottom) | --wst-button-secondary-border-bottom-style | |
| Secondary Button | Padding (bottom) | --wst-button-secondary-padding-bottom | |
| Secondary Button | Padding (top) | --wst-button-secondary-padding-top | |
| Secondary Button | Padding (left) | --wst-button-secondary-padding-left | |
| Secondary Button | Padding (right) | --wst-button-secondary-padding-right | |
| Secondary Button | Corner radius (top left) | --wst-button-secondary-border-top-left-radius | |
| Secondary Button | Corner radius (top right) | --wst-button-secondary-border-top-right-radius | |
| Secondary Button | Corner radius (bottom left) | --wst-button-secondary-border-bottom-left-radius | |
| Secondary Button | Corner radius (bottom right) | --wst-button-secondary-border-bottom-right-radius | |
| Secondary Button | Horizontal spacing | --wst-button-secondary-column-gap | |
| Secondary Button | Vertical spacing | --wst-button-secondary-row-gap | |
| Secondary Button | Text color | --wst-button-secondary-color | --wst-accent-1-color |
| Secondary Button | Text highlight | --wst-button-secondary-text-highlight | |
| Secondary Button | Text font | --wst-button-secondary-font | --wst-paragraph-2-font |
| Secondary Button | Letter spacing | --wst-button-secondary-letter-spacing | |
| Secondary Button | Text decoration | --wst-button-secondary-text-decoration | |
| Secondary Button | Case | --wst-button-secondary-text-transform | |
| Secondary Button | Text shadow | --wst-button-secondary-text-shadow | |
| Secondary Button | Alignment | --wst-button-secondary-justify-content | |
| Secondary Button | Fill image | --wst-button-secondary-background-image | |
| Tertiary Button | Fill color | --wst-button-tertiary-background-color | |
| Tertiary Button | Border color (left) | --wst-button-tertiary-border-left-color | |
| Tertiary Button | Border color (right) | --wst-button-tertiary-border-right-color | |
| Tertiary Button | Border color (top) | --wst-button-tertiary-border-top-color | |
| Tertiary Button | Border color (bottom) | --wst-button-tertiary-border-bottom-color | |
| Tertiary Button | Shadow | --wst-button-tertiary-box-shadow | |
| Tertiary Button | Border width (left) | --wst-button-tertiary-border-left-width | |
| Tertiary Button | Border width (right) | --wst-button-tertiary-border-right-width | |
| Tertiary Button | Border width (top) | --wst-button-tertiary-border-top-width | |
| Tertiary Button | Border width (bottom) | --wst-button-tertiary-border-bottom-width | |
| Tertiary Button | Border style (left) | --wst-button-tertiary-border-left-style | |
| Tertiary Button | Border style (right) | --wst-button-tertiary-border-right-style | |
| Tertiary Button | Border style (top) | --wst-button-tertiary-border-top-style | |
| Tertiary Button | Border style (bottom) | --wst-button-tertiary-border-bottom-style | |
| Tertiary Button | Padding (bottom) | --wst-button-tertiary-padding-bottom | |
| Tertiary Button | Padding (top) | --wst-button-tertiary-padding-top | |
| Tertiary Button | Padding (left) | --wst-button-tertiary-padding-left | |
| Tertiary Button | Padding (right) | --wst-button-tertiary-padding-right | |
| Tertiary Button | Corner radius (top left) | --wst-button-tertiary-border-top-left-radius | |
| Tertiary Button | Corner radius (top right) | --wst-button-tertiary-border-top-right-radius | |
| Tertiary Button | Corner radius (bottom left) | --wst-button-tertiary-border-bottom-left-radius | |
| Tertiary Button | Corner radius (bottom right) | --wst-button-tertiary-border-bottom-right-radius | |
| Tertiary Button | Horizontal spacing | --wst-button-tertiary-column-gap | |
| Tertiary Button | Vertical spacing | --wst-button-tertiary-row-gap | |
| Tertiary Button | Text color | --wst-button-tertiary-color | --wst-accent-1-color |
| Tertiary Button | Text highlight | --wst-button-tertiary-text-highlight | |
| Tertiary Button | Text font | --wst-button-tertiary-font | --wst-paragraph-2-font |
| Tertiary Button | Letter spacing | --wst-button-tertiary-letter-spacing | |
| Tertiary Button | Text decoration | --wst-button-tertiary-text-decoration | |
| Tertiary Button | Case | --wst-button-tertiary-text-transform | |
| Tertiary Button | Text shadow | --wst-button-tertiary-text-shadow | |
| Tertiary Button | Alignment | --wst-button-tertiary-justify-content | |
| Tertiary Button | Fill image | --wst-button-tertiary-background-image |
Two box styles. Values come from the site's box set, which the owner can swap or edit.
| Style name | Property | CSS variable | Defaults to |
|---|---|---|---|
| Box 1 | Border width (left) | --wst-box-primary-border-left-width | |
| Box 1 | Border style (left) | --wst-box-primary-border-left-style | |
| Box 1 | Border color (left) | --wst-box-primary-border-left-color | --wst-base-2-color |
| Box 1 | Border width (right) | --wst-box-primary-border-right-width | |
| Box 1 | Border style (right) | --wst-box-primary-border-right-style | |
| Box 1 | Border color (right) | --wst-box-primary-border-right-color | --wst-base-2-color |
| Box 1 | Border width (top) | --wst-box-primary-border-top-width | |
| Box 1 | Border style (top) | --wst-box-primary-border-top-style | |
| Box 1 | Border color (top) | --wst-box-primary-border-top-color | --wst-base-2-color |
| Box 1 | Border width (bottom) | --wst-box-primary-border-bottom-width | |
| Box 1 | Border style (bottom) | --wst-box-primary-border-bottom-style | |
| Box 1 | Border color (bottom) | --wst-box-primary-border-bottom-color | --wst-base-2-color |
| Box 1 | Corner radius (top left) | --wst-box-primary-border-top-left-radius | |
| Box 1 | Corner radius (top right) | --wst-box-primary-border-top-right-radius | |
| Box 1 | Corner radius (bottom left) | --wst-box-primary-border-bottom-left-radius | |
| Box 1 | Corner radius (bottom right) | --wst-box-primary-border-bottom-right-radius | |
| Box 1 | Shadow | --wst-box-primary-box-shadow | |
| Box 1 | Background color | --wst-box-primary-background-color | --wst-shade-1-color |
| Box 1 | Fill image | --wst-box-primary-background-image | |
| Box 2 | Border width (left) | --wst-box-secondary-border-left-width | |
| Box 2 | Border style (left) | --wst-box-secondary-border-left-style | |
| Box 2 | Border color (left) | --wst-box-secondary-border-left-color | --wst-base-2-color |
| Box 2 | Border width (right) | --wst-box-secondary-border-right-width | |
| Box 2 | Border style (right) | --wst-box-secondary-border-right-style | |
| Box 2 | Border color (right) | --wst-box-secondary-border-right-color | --wst-base-2-color |
| Box 2 | Border width (top) | --wst-box-secondary-border-top-width | |
| Box 2 | Border style (top) | --wst-box-secondary-border-top-style | |
| Box 2 | Border color (top) | --wst-box-secondary-border-top-color | --wst-base-2-color |
| Box 2 | Border width (bottom) | --wst-box-secondary-border-bottom-width | |
| Box 2 | Border style (bottom) | --wst-box-secondary-border-bottom-style | |
| Box 2 | Border color (bottom) | --wst-box-secondary-border-bottom-color | --wst-base-2-color |
| Box 2 | Corner radius (top left) | --wst-box-secondary-border-top-left-radius | |
| Box 2 | Corner radius (top right) | --wst-box-secondary-border-top-right-radius | |
| Box 2 | Corner radius (bottom left) | --wst-box-secondary-border-bottom-left-radius | |
| Box 2 | Corner radius (bottom right) | --wst-box-secondary-border-bottom-right-radius | |
| Box 2 | Shadow | --wst-box-secondary-box-shadow | |
| Box 2 | Background color | --wst-box-secondary-background-color | --wst-base-1-color |
| Box 2 | Fill image | --wst-box-secondary-background-image |
Two line styles. Widths come from the site's line set, which the owner can edit.
| Style name | Property | CSS variable | Defaults to |
|---|---|---|---|
| Line 1 | Color | --wst-system-line-1-color | --wst-base-2-color |
| Line 1 | Width | --wst-system-line-1-width | |
| Line 2 | Color | --wst-system-line-2-color | --wst-accent-1-color |
| Line 2 | Width | --wst-system-line-2-width |
A var() fallback keeps your app rendering when a variable is unavailable. In this example, --wst-heading-1-color is a Harmony variable and #000000 is the fallback:
A custom element can run on any editor, and you can't control which one a site owner uses, so nest a second var() inside the fallback. An Editor React Component runs only on Harmony and doesn't need this. This example resolves --wst-heading-1-color on a Harmony site, falls back to the Wix Editor and Wix Studio variable --wst-color-title elsewhere, and falls back to black if neither exists:
The variables to nest are listed in Site Theme CSS Variables.
Last updated: 6 August 2026