CopilotPopup

Accessible floating Copilot chat dialog for Angular.


CopilotPopup renders a floating launcher and responsive chat dialog. It is a standalone, OnPush component with the selector copilot-popup.

import { Component, signal } from "@angular/core";
import { CopilotPopup } from "@copilotkit/angular";

@Component({
  imports: [CopilotPopup],
  template: `
    <copilot-popup
      [(open)]="open"
      title="Support assistant"
      [width]="420"
      [height]="560"
      [clickOutsideToClose]="false"
    />
  `,
})
export class SupportAssistant {
  readonly open = signal(false);
}

Inputs and model

NameTypeDefaultBehavior
openModelSignal<boolean>trueTwo-way bindable open state
titlestring"Copilot"Accessible dialog name and default header text
widthnumber | string420Pixel number or CSS dimension
heightnumber | string560Pixel number or CSS dimension
clickOutsideToClosebooleanfalseOpts into backdrop-click closing
chatComponentType<unknown>CopilotChatReplacement chat body component
headerComponentType<unknown> | undefinedundefinedReplacement header component

The dialog traps focus, moves initial focus to its close control, closes on Escape, and restores focus to the launcher. It becomes full-screen on compact viewports and disables its entrance animation when reduced motion is requested. Destroying the component removes its rendered dialog and Angular CDK focus-trap state. Browser focus work starts after rendering and is inert during SSR; keep the initial open value unchanged until hydration completes.