The widget
Embed the Syncanix chat widget in your app with a single script tag — isolated, lazy, and on-brand.
The widget is the fastest way to put the assistant in your product. It’s a single script that mounts a chat launcher, isolated from your page so nothing collides.
Embedding
Add one script tag with your publishable key. You can also install it from npm or self-host the script if you prefer.
<script
type="module"
src="https://cdn.syncanix.com/widget.js"
data-key="pk_live_..."
data-position="bottom-right"
></script>The script must be loaded as type="module". That is the only requirement.
How it loads
The script boots a tiny launcher immediately and loads the chat itself only when a user opens it, so it costs your page almost nothing up front. The chat runs inside a Shadow DOM, so your styles and the widget’s never affect each other.
Safe by default
If the key or an attribute is wrong, the widget never throws into your page — it logs a warning and renders nothing, and your key is redacted from any message. A broken embed can’t break your app.
What the widget can and can't touch
The widget is deliberately sealed off from the page it lives on. In practical terms:
- It runs inside a Shadow DOM, so its styles and your page's styles can never affect each other.
- It doesn't read your page's content, cookies, local storage, or other scripts — it only works with what you explicitly hand it.
- It uses a publishable key, which is safe to ship in your page source: it can start a chat for your workspace and nothing more.
- It can never do anything the signed-in user couldn't do themselves — every action runs with their identity and permissions.