> For the complete documentation index, see [llms.txt](https://partner-docs.covergenius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partner-docs.covergenius.com/xcover-elements/client-integration/element-theming.md).

# Element Theming

## Theme overrides

XCover Elements panels can be themed by adding predefined CSS custom properties and values to the root of the host website. The css custom properties are defined by XCE and are used to target specific pieces in the panel to be customized.

The following CSS custom properties can be used to customize the appearance of the panel:

<table data-full-width="true"><thead><tr><th>Variable</th><th>Description</th></tr></thead><tbody><tr><td><code>--xce-ext-heading-color</code></td><td>Text color of the panel heading</td></tr><tr><td><code>--xce-ext-heading-font-size</code></td><td>Font size of the panel heading</td></tr><tr><td><code>--xce-ext-heading-image-size</code></td><td>Icon size of the panel heading</td></tr><tr><td><code>--xce-ext-link-text-color</code></td><td>Text links color of the overall panel</td></tr><tr><td><code>--xce-ext-content-pill-background-color</code></td><td>Background color of the CTA pill</td></tr><tr><td><code>--xce-ext-content-pill-color</code></td><td>Text color of the CTA pill</td></tr><tr><td><code>--xce-ext-options-warning-panel-display</code></td><td>Display value of the Warning Panel when selecting Reject option</td></tr><tr><td><code>--xce-ext-options-selected-color</code></td><td>Color of the options border, radio input border and background when selecting an option</td></tr><tr><td><code>--xce-ext-options-error-color</code></td><td>Color of the options border, radio input border, background and the required message text when triggering error state</td></tr><tr><td><code>--xce-ext-options-radio-background-color</code></td><td>Background color of the options radio input on default state</td></tr><tr><td><code>--xce-ext-options-radio-error-background-color</code></td><td>Background color of the options radio input when triggering error state</td></tr><tr><td><code>--xce-ext-options-radio-border-color</code></td><td>Border color of the options radio input on default state</td></tr><tr><td><code>--xce-ext-options-radio-size</code></td><td>Size of the options radio input on any state</td></tr><tr><td><code>--xce-ext-options-radio-border-weight</code></td><td>Border weight of the options radio input on any state</td></tr></tbody></table>

The following example shows how to add custom CSS overrides:

<pre class="language-css"><code class="lang-css">:root {
<strong>    --xce-ext-heading-color: red;
</strong>    --xce-ext-heading-font-size: 24px;
    --xce-ext-heading-image-size: 32px;
    --xce-ext-link-text-color: blue;
    --xce-ext-content-pill-background-color: brown;
    --xce-ext-content-pill-color: yellow;
    --xce-ext-options-warning-panel-display: none;
}
</code></pre>

{% hint style="warning" %}
These theme variables **take priority over color schemes dark and light variables**. Make sure to consider aligning these variables overrides with your color scheme accordingly.
{% endhint %}

## Color schemes: Dark or Light

Our panels have the ability to switch between dark and light color scheme using the built in custom attribute `color-scheme`

To set a color scheme just pass in a string value to the `color-scheme` attribute with either `dark` or `light`

```html
<!-- custom attributes example -->
<!-- with 'dark' mode -->
<xce-protection-offer color-scheme="dark"></xce-protection-offer>

<!-- with 'light' mode -->
<xce-protection-offer color-scheme="light"></xce-protection-offer>
```

The default color scheme for our panels is set to light mode.

{% hint style="info" %}
To enable Color scheme, please refer to your CSE regarding the available custom attributes for your element.
{% endhint %}

{% hint style="warning" %}
Elements color scheme will **not change based on browser or user computer theme**.

In case you want to change color scheme based on browser or user computer the attribute would have to be added programmatically by the developer.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://partner-docs.covergenius.com/xcover-elements/client-integration/element-theming.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
