Mount once, anywhere
A loader component near the root injects the script and cleans up on unmount. Guides for React, Next.js App Router, Vue, Nuxt, Svelte and Astro.
The widget is a small loader you mount once. From there your app owns it: identify the signed-in user with a signed hash so nobody can impersonate them, open the chat from your own button, listen for new messages, and unmount cleanly on route changes.
No credit card. Live in minutes.
Paste this into a component rendered once near your app's root. Replace the placeholder with the widget key from Settings, then Install; the snippet there already carries it.
Add the loader component below and render it once, for example in App or your root layout.
After sign-in, call window.SellioWidget.setVisitor({ id, name, email, userHash }).
Subscribe with window.SellioWidget.on("unreadChange", fn) to show a badge on your own button.
import { useEffect } from "react";
const WIDGET_KEY = "YOUR_WIDGET_KEY";
const EMBED_SRC = "https://sellio.chat/widget/embed.js";
export function SellioWidgetLoader() {
useEffect(() => {
window.sellioSettings = { widgetKey: WIDGET_KEY };
window.SellioWidget = window.SellioWidget || [];
if (document.getElementById("sellio-embed")) return;
const script = document.createElement("script");
script.id = "sellio-embed";
script.src = EMBED_SRC;
script.async = true;
document.head.appendChild(script);
}, []);
return null;
}A loader component near the root injects the script and cleans up on unmount. Guides for React, Next.js App Router, Vue, Nuxt, Svelte and Astro.
Call setVisitor with the user's id, name, email and an HMAC-SHA256 userHash from your server. Unsigned identities are rejected.
open, close, toggle, setVisitor, sendMessage, requestFeedback, on and destroy. Calls before load are queued and replayed.
ready, open, close, newMessage and unreadChange, each returning an unsubscribe.
Lock the widget to the domains you approve. The loader never touches localStorage unguarded, so partitioned contexts do not break it.
Website chats land beside WhatsApp, Instagram, Telegram and email, with an AI agent on website chat.
Render the loader component once near your root, with your widget key.
When someone signs in, call setVisitor with their id, name, email and the userHash your server computed.
Open the chat from your own Help button and show an unread count from the unreadChange event.
No. The widget is a script the loader injects, so there is nothing to version in your bundle. The snippet on this page is the whole integration.
The widget API docs list every method and event.
Still have a question? Contact us or browse the docs.
Mount once, identify users with a signed hash, drive it from your code.
No credit card required