showcase/shell-docs/src/content/docs/prebuilt-components/chat.mdx
<CopilotChat> is the base prebuilt chat surface. Drop it in wherever you
want the chat to render and size it to fit your layout. <CopilotSidebar>
and <CopilotPopup> are both thin wrappers over the same primitives; if you
need a dedicated chat page or an inline pane alongside other content, this
is the component you want.
Use <CopilotChat> when you want:
/chat routeFor a collapsible docked chat, use CopilotSidebar. For a floating bubble that overlays content, use CopilotPopup.
<InlineDemo demo="agentic-chat" />The gif below shows a typical session with streaming responses and starter suggestions:
Wrap your app in <CopilotKit> once (the provider wires the runtime, session,
and agent registry) and render <CopilotChat> inside the layout of your
choosing:
A self-contained component that renders the chat and wires in starter suggestions:
<Snippet region="chat-component" title="frontend/src/app/page.tsx — the Chat component" /><CopilotChat> is the root primitive. <CopilotSidebar> and <CopilotPopup>
accept the same slots and labels, plus a few wrapper-specific props.
| Prop | Description |
|---|---|
agentId | Agent slug the chat should talk to (must match an agent configured on the runtime). |
labels | User-facing copy — header title, placeholder, welcome, disclaimer. |
messageView | Slot for the message list — see slots. |
input | Slot for the composer area (text area, send button, disclaimer). |
scrollView | Slot for the scroll container (e.g. custom feather/gradient). |
suggestionView | Slot for the suggestion pills shown below messages. |
welcomeScreen | Slot for the empty-state. Pass false to disable. |
<CopilotChat> is fully themable: