Both use a separate script,
rf-embed.min.js. It renders into an element you place, so your own layout decides where the agent sits and how big it is. Your existing bubble snippet keeps working unchanged, and you can run both on the same site.
Choose the layout
- In your Replyful dashboard, open Channels → Chat and pick your chatbot.
- Open the Embed tab and choose Side panel or Full page.
- Copy the code snippet shown below the layout cards.
Full page
Add the script once, then place a container where the agent should appear. Give the container the size of your content area:Side panel
Place the panel next to your main content and open it from your own button. Your layout decides whether the panel pushes the content aside or overlays it. Keephidden on the panel and disabled on the button: the script takes over both once it has loaded, so nothing flashes and no early click is lost.
If an ancestor of the panel uses
transform, filter or contain, browsers keep the mobile drawer inside that ancestor instead of covering the screen. Place the panel outside such elements.Container attributes
The script finds containers on load and any added later, so it works with single-page apps. Removing a container cleans up its agent.
JavaScript API
window.ReplyfulEmbed is available once the script has loaded. Because the script loads async, check for it and otherwise wait for the replyful-embed:ready event on window.
open, close, iframe-ready, identity-verified, identity-failed. A full-page agent is always open, so close() does nothing there.
The global is ReplyfulEmbed, not the bubble’s replyful, so both can run on the same page.
Signed-in users
Inside your product your users are usually signed in, so link their conversations to them. Sign a token on your backend exactly as described in User identification, and pass it toidentify each time the chat loads:
iframe-ready means it’s always fresh, even when the panel is first opened hours after the page loaded, so a short expiry is fine.
To hold the chat until your user is identified, add data-identity="required" (or pass identity: "required" to mount). The message box then stays locked until the token is verified, and shows an error if verification fails. This only affects the container you put it on; it is a convenience for your signed-in users, not access control.
To refuse anonymous visitors altogether, turn on Require identification for the chatbot. See Require identification.
Theming
The agent takes on your app’s look automatically. It reads the background behind the container, the container’s text colour and font, and whether your page is light or dark. If your app defines shadcn-style CSS variables (--primary, --muted, --border, --radius and so on), it uses those too; any it doesn’t define are mixed from your background and text colour, so a dark page gets dark borders and bubbles without any variables at all. When your app switches between light and dark mode, the agent follows.
To set colours explicitly, pass theme to mount, call setTheme, or add data-theme-* attributes. Explicit values win over detected ones. Supported keys:
background, foreground, primary, primary-foreground, muted, muted-foreground, secondary, secondary-foreground, accent, accent-foreground, border, input, radius, color-scheme (light or dark) and fontFamily.
Values must be plain colours or lengths. A fontFamily must be a system font or a font on Google Fonts. Without a primary, buttons and links use your chatbot’s brand colour.