> For the complete documentation index, see [llms.txt](https://docs.zaia.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaia.app/channels/channel-types/widget.md).

# Widget

The **Widget** channel is used to embed an interactive chat directly on your website or system.

#### Steps to Create

1. Select **Type: Widget**.
2. Name the channel (e.g., *Official Widget*).
3. Assign a responder (Agent or Squad).
4. Optionally, add a custom prompt.
5. Set the response delay.
6. Click **Create Channel**.

Once created, the channel exposes a **Widget Configuration Page** containing:

| Section                   | Description                                                                  |
| ------------------------- | ---------------------------------------------------------------------------- |
| **Configuration Code**    | JavaScript snippet that must be copied and pasted into your site or web app. |
| **Theme Controls**        | Switch between **Light Mode** and **Dark Mode** versions.                    |
| **Customization Options** | Modify colors for background, text, and buttons.                             |
| **Open on Load**          | Option to auto-open the widget when the page loads.                          |

```html
<body>
  <script>
    window.ZV2Widget = {
      ChannelURL: "https://widget.endless.zaia.app/widget/channel/..."
    };
  </script>
  <script src="https://widget.endless.zaia.app/script/widget-loader.js" async></script>
</body>
```

> ⚙️ Use the “Copy” button to copy the full script into your HTML `<body>` section.\
> Once deployed, your website visitors will be able to chat directly with your Agent.

## **Customization Notes**

For **Widget Channels**, Zaia provides a live customization environment:

* Modify message bubble colors and text colors.
* Adjust button color to match your branding.
* Switch between Light and Dark previews.
* Instantly preview all UI changes before saving.

Each customization option is applied independently per channel, allowing multiple widget styles for different sites or environments.

### Send documents in the Widget

Website visitors can attach documents to Widget messages. The Widget accepts:

* `.pdf`
* `.md`
* `.txt`

Each document can be up to **10 MB**. Zaia sends the file's original extension with the message.

{% hint style="info" %}
PDF files have an additional content limit. Zaia rejects PDFs whose converted text exceeds 50,000 characters.
{% endhint %}

Markdown and text files do not use this PDF content check.

### Document restrictions by channel

Document availability depends on the channel. Instagram does not support document attachments.

This restriction applies to PDF, Markdown, and text files.

***

### Draft Test Widget

Use a **Test Widget** to share an Agent's current Draft with people outside the workspace before publishing it.

* A Test Widget always uses the responder's **Draft** version.
* A regular Widget continues to use the **Production** version.
* Draft changes become available in the Test Widget without publishing the Agent.
* The shared experience is visibly identified as a test environment.
* Publishing remains a separate action and is not triggered by creating or using the Test Widget.
* Disable or remove the Test Widget to end external test access.

Use the Test Widget to validate instructions, tone, tools, and conversation behavior with external reviewers while keeping Production unchanged.
