> 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/elements/elements.md).

# CG Elements

A browser SDK packed with rich UI components to design an insurance offer experience that matches your site and helps drive conversion.

### Overview

You request an offer from your backend. You pass the response to the SDK. The SDK builds the offer panel, applies your brand, and tells your code when the customer makes a choice.

<a href="https://partner-docs.covergenius.com/elements/installation.md" class="button primary">Get started</a>

{% hint style="warning" icon="flask" %}
CG Elements is in alpha. The API can change between versions. Pin the exact version that you install.
{% endhint %}

### Background

An offer panel needs the right layout, the right copy, and the right legal text. The panel also needs your brand and a correct price. A custom build of all these parts takes time and needs regular updates.

CG Elements moves this work into one SDK. Your team writes a small amount of code. Cover Genius owns the panel.

**Layout comes with the offer:** The offer response carries a `presentation` field. This field tells the SDK which layout to show and which theme to apply. The SDK ships every layout that the field can name. You do not write markup for the panel. You do not map response fields to UI parts.

**Your brand, your page:** The SDK applies the colors and sizes that you agree with Cover Genius. The panel inherits the typeface of your page. The panel keeps its styles inside a shadow root, so your page styles do not break it.

**Safe by design:** The SDK shows the legal disclaimer from the response. It builds the disclaimer from an allowed set of elements, so the SDK never inserts raw HTML from the response.

**Semantic events:** The SDK sends three events to your code: `ready`, `change`, and `error`. You never listen to DOM events inside the panel.

### What you build

| Part                                    | Owner                |
| --------------------------------------- | -------------------- |
| Request the offer from the Offers API   | You (backend)        |
| Pass the response to the browser        | You                  |
| Add `<cg-elements>` and call `render()` | You (frontend)       |
| Choose the layout, copy, and legal text | Cover Genius         |
| Agree the theme values                  | You and Cover Genius |
| Draw the panel and handle interaction   | The SDK              |
| Confirm the offer and book              | You (backend)        |

### Where to go next

<table data-view="cards"><thead><tr><th></th><th></th><th data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Integration</strong></td><td>See the full flow from offer to booking.</td><td><a href="https://partner-docs.covergenius.com/elements/integration.md">Integration</a></td><td></td></tr><tr><td><strong>Installation</strong></td><td>Add the SDK to your project.</td><td><a href="https://partner-docs.covergenius.com/elements/installation.md">Installation</a></td><td></td></tr><tr><td><strong>Displaying an Offer</strong></td><td>Show your first panel.</td><td><a href="https://partner-docs.covergenius.com/elements/guides/displaying-an-offer.md">Displaying an Offer</a></td><td></td></tr><tr><td><strong>Handling Selection</strong></td><td>React to the customer's choice.</td><td><a href="https://partner-docs.covergenius.com/elements/guides/handling-selection.md">Handling Selection</a></td><td></td></tr></tbody></table>

{% hint style="info" %}
CG Elements does not replace the Offers API. You still create, confirm, modify, and cancel offers from your backend. See the [Offers documentation](https://partner-docs.covergenius.com/offers).
{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://partner-docs.covergenius.com/elements/elements.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
