Widget Embed Code
Complete code snippets for embedding Veloquence on your website. Copy, paste, and go live.
The popup widget adds a floating button to the corner of your page. When clicked, it opens a chat window that overlays your site content. During a call, visitors can minimize it to a small video tile in the corner while the agent keeps talking.
<script>
window.VeloquenceWidgetConfig = {
token: "YOUR_SHARE_TOKEN",
mode: "popup",
theme: "system",
buttonColor: "#D4AF37",
position: "bottom-right",
width: 400,
height: 650
};
</script>
<script src="https://[your-subdomain].veloquence.ai/embed/veloquence-widget.js" defer></script>The side panel opens from a tab on the right or left edge of the page into a full-height panel docked to that edge, with room for a live avatar. On wide screens the page makes room for it (set pushContent: falseto overlay instead); the panel's width is also set as --veloquence-push-right (or --veloquence-push-left) on the page root, so fixed headers can follow with right: var(--veloquence-push-right, 0px). The collapse button in the panel header folds it back to the tab. During a call, slides and media the agent shows open large beside the panel, and that header button (or the one on the call controls) minimizes the call to a small video tile in the corner: the agent keeps talking, presenting and pointing at your page. On phones it opens full screen.
<script>
window.VeloquenceWidgetConfig = {
token: "YOUR_SHARE_TOKEN",
mode: "panel",
theme: "system",
buttonColor: "#D4AF37",
position: "bottom-right",
width: 400
};
</script>
<script src="https://[your-subdomain].veloquence.ai/embed/veloquence-widget.js" defer></script>The inline embed renders the chat interface directly inside a container element on your page, making it part of your page layout.
<div id="veloquence-embed" style="width: 100%; height: 600px;"></div>
<script>
window.VeloquenceWidgetConfig = {
token: "YOUR_SHARE_TOKEN",
mode: "inline",
theme: "system",
container: "#veloquence-embed"
};
</script>
<script src="https://[your-subdomain].veloquence.ai/embed/veloquence-widget.js" defer></script>Use a standard iframe if you need full isolation from your page styles and scripts, or if your platform doesn't support custom JavaScript.
<iframe
src="https://[your-subdomain].veloquence.ai/s/YOUR_SHARE_TOKEN"
width="400"
height="650"
frameborder="0"
allow="microphone; autoplay; encrypted-media; picture-in-picture; fullscreen"
style="border: none; border-radius: 12px;"
></iframe>allow="microphone" in the iframe attributes for voice-enabled agents. Without it, the browser will block microphone access inside the iframe.| Option | Type | Default | Description |
|---|---|---|---|
token | string | (required) | Your agent's share token |
mode | "popup" | "panel" | "inline" | "popup" | Widget display mode ("panel" is the full-height side panel) |
theme | "light" | "dark" | "system" | "custom" | "system" | Color theme for the widget |
buttonColor | string | "#D4AF37" | Launcher button color (popup and side panel) |
position | "bottom-right" | "bottom-left" | "bottom-right" | Launcher corner; a side panel docks to that edge (popup and side panel) |
width | number | 400 | Widget width in pixels |
height | number | 650 | Widget height in pixels (popup only; a side panel is full height) |
pushContent | boolean | true | Side panel only: make room for the open panel on wide screens instead of covering the page edge. The width is set as --veloquence-push-right / --veloquence-push-left on the page root for fixed headers |
container | string | — | CSS selector for the target element (inline mode only) |
zIndex | number | 9999 | Stacking order — raise it if a sticky header or cookie banner covers the widget |
spaHost | boolean | false | Set true on single-page apps so the host router owns navigation |
apiBase | string | (widget origin) | Veloquence API origin — only needed when the API is on a different host |