Live chat for Next.js

Add the chat to your root layout with next/script and it stays open across client-side navigation. Sign the user in a Server Component, and your secret never reaches the browser.

Free plan forever · No card required

Why XACUBE here

No bundle cost

There is no npm package and no React component to ship. The script loads after the page with strategy="afterInteractive", outside your bundle.

Signed in the Server Component

Compute the HMAC with node:crypto in a Server Component, pass it to the script, and the inbox shows each user by name with no way to fake it.

Follows your app’s language

If your app changes <html lang> or dir without a reload, the chat notices and switches language and side to match.

Live in three steps

  1. 1Create a free XACUBE account, add your domain and copy your key.
  2. 2Add the Script from the install guide to app/layout.tsx, inside <body>.
  3. 3Deploy. For signed-in users, add XACUBE_SECRET_KEY to your environment and pass the signed id.
Full install guide

What you get

Signed-in customers

Your server signs the customer’s id, so the inbox shows their real name and nobody can pretend to be them.

RTL and LTR support

The chat follows your page’s language, with right-to-left and left-to-right languages both laid out properly.

One shared inbox

Every conversation from every website in one place. Assign, resolve and reopen, and share a link to any chat.

Live visitors

See who is on your site right now, with country flag, page, device and browser, before they write a word.

Questions and answers

Does it work with the App Router and the Pages Router?

Yes. In the App Router use the root layout.tsx. In the Pages Router put the same Script in _app.tsx.

What about plain React with Vite?

Paste the script tag into index.html before </body>. React, Vue, Svelte and Angular each have their own install guide too.

Can I open or hide the chat from my code?

Yes. window.XACUBE.hide() and window.XACUBE.show() toggle the button, for example to keep it off a full-screen editor.

Is it safe with a strict Content Security Policy?

Allow the XACUBE chat host in script-src, connect-src and frame-src. The chat runs in its own frame and never reads your page’s data.

Add live chat to your website today

Create a free account, add your site and answer your first visitor in a few minutes.

Start free

Free plan forever · No card required