> ## Documentation Index
> Fetch the complete documentation index at: https://docs.concatflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <concatflow-assistant>

> The custom element defined by widget.js. The public door with no JavaScript of your own.

```html theme={"system"}
<script src="https://app.concatflow.com/widget.js"></script>
<concatflow-assistant site-token="st_YOUR_SITE_TOKEN" launcher="bar" theme="auto"></concatflow-assistant>
```

`widget.js` defines the element. It works in any page, CMS or template that accepts HTML.

> [!NOTE]
>
> The element only opens the **public door**. The per-user door needs a token from your server, so it needs a few lines of JavaScript: see [Per-user door](https://docs.concatflow.com/guides/per-user-door.md).

## Attributes

**site-token** `string` *required*

The assistant's public site token, `st_…`. Without it, the element logs a warning and renders nothing.

**launcher** `"bar" | "bubble"` (default: bubble)

`"bar"` renders the search bar where the element is written. Any other value, or none, gives the bubble.

**theme** `"auto" | "light" | "dark"` (default: auto)

See [Appearance](https://docs.concatflow.com/guides/appearance.md).

**accent** `string`

A CSS colour for the bar's magnifier and focus ring.

**placeholder** `string` (default: Posez une question…)

The bar's placeholder text.

**base** `string` (default: [https://app.concatflow.com](https://app.concatflow.com))

The Concatflow origin of the iframe.

## Lifecycle

* The assistant is created when the element enters the page, and destroyed when it leaves. Frameworks that add and remove it get the right behaviour.
* Attributes are read once, when the element enters the page. To change one, remove the element and add a new one.

## Loading `widget.js` twice

Two CMS plugins, a bundle and a tag: including `widget.js` twice is harmless. The second copy does nothing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.