> For the complete documentation index, see [llms.txt](https://docs.getpurpledot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getpurpledot.com/e-commerce-platforms/other-and-custom/use-web-components.md). Agents can also search and read this documentation through its [MCP server](https://docs.getpurpledot.com/~gitbook/mcp).

# Use web components

Custom elements registered for learn more, checkout, separate cart, and shopper self-service.

These elements are custom elements. Render them after `@purple-dot/browser` has been initialized. See [Use the browser SDK](https://docs.getpurpledot.com/e-commerce-platforms/other-and-custom/use-the-browser-sdk.md).

| Element                       | Role                                                                                                        |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `<purple-dot-learn-more />`   | Ship dates and the pre-order explanation beside a pre-order button                                          |
| `<purple-dot-checkout />`     | Checkout element. Open it through `@purple-dot/browser/checkout` rather than by setting attributes yourself |
| `<purple-dot-separate-bag />` | Separate-cart control                                                                                       |
| `<purple-dot-self-service />` | Shopper page for managing a pre-order                                                                       |
| `<purple-dot-modal />`        | Modal used by the other components                                                                          |

Place `<purple-dot-learn-more />` next to the pre-order button when the variant state is `ON_PREORDER`. Place `<purple-dot-self-service />` on the page linked from **Cancel link** under **Settings** > **Email**.

`<purple-dot-separate-bag />` and `<purple-dot-modal />` take no required attributes. Open the modal from script with `open(title, message)`. `<purple-dot-learn-more />` accepts optional `data-release-id`, `data-use-extended-delivery-language`, and `data-use-partnership-branding`, and `<purple-dot-self-service />` accepts an optional `data-preorder-id`.

## Related

* **Do this:** [Use the browser SDK](https://docs.getpurpledot.com/e-commerce-platforms/other-and-custom/use-the-browser-sdk.md), [Show pre-order state on a product page](https://docs.getpurpledot.com/e-commerce-platforms/other-and-custom/show-pre-order-state-on-a-product-page.md)
* **Look up:** [Public API](https://docs.getpurpledot.com/purple-dot-apis/public-api.md)


---

# 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://docs.getpurpledot.com/e-commerce-platforms/other-and-custom/use-web-components.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.
