# CopilotPopup

> Floating chat bubble that toggles open an overlay chat window.

> **Not available for agent-spec yet.** The code on this page comes from the showcase's `prebuilt-popup` demo, and agent-spec doesn't have it yet. See this page for [CopilotKit's Built-in Agent](/prebuilt-components/popup), [LangGraph (Python)](/langgraph-python/prebuilt-components/popup), [LangGraph (TypeScript)](/langgraph-typescript/prebuilt-components/popup).

## What is this? [#what-is-this]

`<CopilotPopup>` is a prebuilt floating launcher that opens an overlay chat
window on top of your page content. It adds a copilot to an existing app
without changing your page layout. Drop it in once and a bubble appears in the
corner ready to chat.

## When should I use this? [#when-should-i-use-this]

Use the popup when you want:

- A minimal-footprint copilot that overlays existing content on demand
- A launcher you can place on top of any page without reflowing the layout
- A quick assistant bubble that users open for short, task-focused chats

If you need chat to live alongside your content rather than on top of it,
use [CopilotSidebar](/agent-spec/prebuilt-components/sidebar). For a fully embedded
chat pane, use [`<CopilotChat>`](/agent-spec/prebuilt-components/chat) directly.

## Basic setup [#basic-setup]

Wrap your app in `<CopilotKit>` once (the provider wires the runtime,
session, and agent registry) and render `<CopilotPopup>` as a sibling of
your main content. The example below opens the popup by default and
customizes the input placeholder via `labels`:

```tsx
import { CopilotKit, CopilotPopup } from "@copilotkit/react-core/v2";
import "@copilotkit/react-core/v2/styles.css";
```

Import from `@copilotkit/react-core/v2`. The `CopilotPopup` in `@copilotkit/react-ui` is the [deprecated v1 popup](/agent-spec/migrate/v2).

`<MainContent />` and `<Suggestions />` are demo components. Replace them with your own content.

## Configuring the popup [#configuring-the-popup]

`<CopilotPopup>` accepts the same props as `<CopilotChat>` plus a few of
its own. Commonly used options:

| Prop | Description |
|------|-------------|
| `defaultOpen` | Whether the popup starts open on first render. |
| `open` / `onOpenChange` | Control the open state from your own UI. See [Open, close, and feedback](/agent-spec/prebuilt-components/chat-controls). |
| `agentId` | Agent slug the popup should talk to (must match an agent configured on the runtime). |
| `labels` | User-facing copy for the header, placeholder, and disclaimer. |
| `header` | Slot for the popup header bar. See the [slot system](/agent-spec/custom-look-and-feel/slots). |
| `toggleButton` | Slot for the floating launcher button. |

## Styling [#styling]

`CopilotPopup` participates in the slot system, so every piece of its UI
is customizable, from Tailwind classes on the message view to a full
component swap for the header or toggle button. See
[custom look and feel](/agent-spec/custom-look-and-feel/slots) for the full slot
reference.
