# Iframe embed

> Embed your agent's chat inline within a page using an iframe snippet.

Source: https://www.lorito.ai/docs/channels/iframe-embed

The **iframe embed** places the chat directly inside a page, as part of your layout, rather than as a floating launcher in the corner. Use it when you want the conversation to live in a fixed spot, like a help page, a contact section, or a dedicated support panel.

The iframe shares its setup with your [website widget](https://www.lorito.ai/docs/channels/website-widget), so there's nothing extra to provision. The embed code is ready whenever the widget is.

## Add the iframe

1. **Open the iframe code**

   In your project, go to **Channels** and click **Configure** on the **Web** card. Open the **Inline iframe** section to find your snippet. It looks like this:

   ```html
   <iframe
     src="https://lorito.ai/chat/your-id/embed"
     width="400"
     height="600"
     style="border:none;border-radius:12px;"
     title="Chat"
   ></iframe>
   ```

   Use the copy button to grab the exact snippet for your project.

2. **Paste it where the chat should appear**

   Paste the snippet into your page's HTML at the exact spot where you want the chat to show. Unlike the widget, the iframe appears right there in the page flow, so its position is wherever you place the code.

3. **Adjust the size**

   Edit the `width` and `height` values to fit your layout. You can use fixed pixel sizes (as shown) or set them to percentages so the chat scales with its container. Try the **Open iFrame preview** link to see how it looks before publishing.

## When to use the iframe vs the widget

> Both surfaces run the same agent and share the same appearance settings. Only the placement differs.

* Use the **iframe** when you want the chat embedded inline, in a specific area of a page.
* Use the [**website widget**](https://www.lorito.ai/docs/channels/website-widget) when you want a floating launcher that's available from every page without taking up layout space.

You can use both at once if it suits your site.
