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

Behavior

  • Focus: the dialog traps focus and moves initial focus to its close control.
  • Escape: closes the dialog. Focus returns to the launcher.
  • Compact viewports: the dialog becomes full-screen.
  • Reduced motion: the dialog has no entrance animation.
  • Destroy: removes the rendered dialog and its Angular CDK focus-trap state.
  • SSR: browser focus work starts after render and does nothing during SSR. Keep the initial open value unchanged until hydration completes.

How is this guide?