Prebuilt Components

Add a full Angular chat and choose its layout, inline, popup, or sidebar.

CopilotChat gives you a complete chat surface backed by the agent from your Copilot Runtime. It owns message streaming, suggestions, the composer, attachments, transcription, and the active thread.

You need the provider from the Angular quickstart.

Choose a chat surface

SurfaceUse it when
CopilotChatChat belongs inside an existing page or panel.
CopilotPopupChat should open from a floating launcher.
CopilotSidebarChat should sit beside the main application or open as an overlay.
CopilotChatViewYou own the agent wiring and only need the chat layout.

All four are standalone Angular components.

Add an inline chat

Import CopilotChat, give its host a real height, and point it at an agent when you do not want the default agent.

src/app/support-chat.component.ts
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { CopilotChat } from "@copilotkit/angular";

@Component({
  selector: "app-support-chat",
  imports: [CopilotChat],
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `
    <section class="chat-shell" aria-label="Support assistant">
      <copilot-chat agentId="support" />
    </section>
  `,
  styles: `
    .chat-shell {
      height: min(48rem, 80vh);
      overflow: hidden;
      border: 1px solid #dbe3eb;
      border-radius: 1rem;
    }
  `,
})
export class SupportChatComponent {}

Import the package stylesheet once in the application's global stylesheet:

src/styles.css
@import "@copilotkit/angular/styles.css";

Use a popup or sidebar

Both modal surfaces manage focus, Escape closing, and launcher-focus restore. Their open model supports two-way binding.

src/app/app.component.ts
import { Component, signal } from "@angular/core";
import { CopilotPopup, CopilotSidebar } from "@copilotkit/angular";

@Component({
  selector: "app-root",
  imports: [CopilotPopup, CopilotSidebar],
  template: `
    <copilot-popup
      [(open)]="popupOpen"
      title="Support assistant"
      [clickOutsideToClose]="true"
    />

    <copilot-sidebar
      [(open)]="sidebarOpen"
      mode="docked"
      position="right"
      title="Workspace assistant"
      [width]="480"
    />
  `,
})
export class AppComponent {
  readonly popupOpen = signal(false);
  readonly sidebarOpen = signal(false);
}

Compact viewports render the sidebar as a modal even when mode is "docked". Only one open docked sidebar can own the page margin at a time.

Run npm start and open the app. Click the popup launcher button. The popup opens, and a message you send gets its reply in the popup.

Next steps

How is this guide?