# What is embedded chat? The embeddable chat widget

> Embedded chat is a room another service hosts and your page renders in an iframe. How the pattern works, and how Cherry's Chat Embed SDK does it.


Embedded chat is a chat room that another service hosts and your own website or app renders in place, almost always inside an iframe. The visitor types in your product; the messages, the history and the session belong to the chat vendor. What is embedded chat good for in crypto? A room that already knows which wallet is speaking, so holders, traders and players can talk beside the thing they came for. Cherry (cherry.fun) is a wallet-to-wallet messenger and community app for crypto, and its Chat Embed SDK is one implementation of the pattern.

## How embedded chat works

Three pieces do the work: a script, a frame, an identity hand-off.

Your page loads the vendor's package from npm or a CDN script tag and mounts the widget, on an element you name or as a floating panel in a corner. The widget itself is an iframe pointed at the vendor's own domain. As MDN puts it, an iframe "represents a nested browsing context, embedding another HTML page into the current one", with its own document; that boundary keeps the chat's code and styles out of your page, and yours out of the chat. Host and widget talk through structured messages across it, which is how a theme change goes in and an unread count comes back out.

Identity is where vendors differ: a widget can authenticate the visitor itself, trust a short-lived token your backend signs, or do both. Most also pin each embed to a list of allowed origins, so a copied embed id renders nothing elsewhere.

## Example on Cherry: the Chat Embed SDK

Cherry's version is `@cherrydotfun/chat-embed-sdk`, version 0.1.7 as of September 2026, installed from npm or from a pinned jsDelivr script tag that exposes `window.CherryEmbedSDK`. You create an embed in Cherry Portal, copy its id, add your site's origin, and mount one room on a `<div>` or as a floating panel with a launcher bubble. The iframe is served from embed.cherry.fun and brings wallet sign-in, realtime delivery, unread and mention badges, and moderation with it.

The three auth modes are the choice worth understanding:

| Mode | Your backend | Wallet signature | Pick it when |
|---|---|---|---|
| `wallet-only` | none | the visitor signs | the room is public and you have no server code to write |
| `app-trusted+wallet` | mints a five-minute token | the visitor signs | you have your own accounts and want wallet ownership proved |
| `app-trusted` | mints the token | none | your login is the sole source of identity |

Theming starts from two to four seed colors and a light or dark mode: the engine derives a palette of around 60 variables and re-anchors any color that would fall below its contrast floors, 4.5:1 for body text. Per-embed moderation covers a minimum wallet age, up to 200 blocked words, a link policy and image and GIF toggles, enforced by Cherry's servers so client-side edits cannot bypass them. One embed renders one room, and every embed also creates a community inside Cherry, so the people who talked on your page stay reachable in the Cherry app. The builder at [cherry.fun/chat-embed-example](https://cherry.fun/chat-embed-example/) runs it all in the browser and prints the snippet.

## Related terms

- [Embeddable chat](https://cherry.fun/learn/features/embeddable-chat/): display modes, host identity and the limits.
- [Add chat to your dApp](https://cherry.fun/learn/guides/add-chat-to-your-dapp/): the quickstart, step by step.
- [Crypto mini app](https://cherry.fun/learn/glossary/crypto-mini-app/): the inverse pattern, your app running inside a chat.
- [Cherry API and bots](https://cherry.fun/learn/features/cherry-api-and-bots/): rooms and messages driven from a server.
- [Token-gated chat](https://cherry.fun/learn/features/token-gated-chat/): the rules a room can check before letting anyone in.

## FAQ

### Is embedded chat the same thing as a chat widget?

In practice, yes. An embeddable chat widget is the component you drop on a page; embedded chat is the pattern of running someone else's chat service inside your own product. Both describe an iframe from a chat vendor mounted on a host page.

### Does an embeddable chat widget need a backend?

Only if you want chat identity tied to your own accounts. A widget that authenticates the visitor itself needs no server code from you: with Cherry's wallet-only mode you pass an embed id and a public room id, and the visitor connects a wallet inside the iframe.

### Can an embedded chat show my app's own usernames?

With some widgets, yes. Cherry's embed can call back to your page or to a profile endpoint for display names and avatars, and it renders those in place of wallet identities while the wallet stays the author of every message.

## Sources

- [MDN: the `<iframe>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe)
- [Cherry docs: Chat Embed SDK installation](https://portal.cherry.fun/docs/embed/installation)
- [Cherry docs: embed authentication modes](https://portal.cherry.fun/docs/embed/authentication)
- [Cherry docs: embed theming](https://portal.cherry.fun/docs/embed/theming)
- [Cherry docs: embed moderation rules](https://portal.cherry.fun/docs/embed/moderation)
- [Cherry live embed builder](https://cherry.fun/chat-embed-example/)

