Prebuilt Components
Drop-in Vue chat components with a customization path from CSS to headless composition.
Open your coding agent in your project's folder, or in an empty folder for a new app.This runs in a coding agent on your computer.
Prebuilt components for agentic chat#
@copilotkit/vue/v2 ships three chat surfaces: CopilotChat,
CopilotSidebar, and
CopilotPopup. They share the same chat
primitives while choosing different layouts. Pick the surface that fits the
product; each handles streaming messages, tool rendering, suggestions, and
Vue slot customization.
Use CopilotThreadsDrawer beside a supported surface when you need a
conversation-history drawer, or use useThreads to build your own switcher.
The customization ladder#
- Drop in a surface. Render
CopilotChat,CopilotSidebar, orCopilotPopupbelowCopilotKitProvider. - Re-skin with CSS. Import the Vue stylesheet and override the
[data-copilotkit]design tokens. - Recompose with slots. Replace an empty state, message list, composer, header, or launcher using Vue named and scoped slots.
- Go headless. Build your layout from
useAgent,useCopilotKit, and the public chat leaf components where needed.
These layers are incremental. A custom welcome-screen slot and CSS token overrides can coexist; moving to a custom surface does not require copying the runtime connection logic.
Drop-in chat#
Import the Vue CSS once, wrap the application in CopilotKitProvider, and put
the chat surface in the provider's default slot:
<script setup lang="ts">
import { CopilotChat, CopilotKitProvider } from "@copilotkit/vue/v2";
import "@copilotkit/vue/styles.css";
</script>
<template>
<CopilotKitProvider runtime-url="/api/copilotkit">
<CopilotChat agent-id="my-agent" />
</CopilotKitProvider>
</template>The Vue Showcase currently exposes this agentic-chat surface. Other
prebuilt-component variations do not have a runnable Vue Showcase route yet.
Starter suggestions#
Call useConfigureSuggestions inside a child component of
CopilotKitProvider. Its reactive configuration is then available to the
nearest chat surface.
Pick a surface#
<CopilotChat>: an inline pane that fills the container you give it.<CopilotSidebar>: a collapsible, docked surface.<CopilotPopup>: a floating launcher and overlay chat.
For controlling a popup or sidebar from your own UI, and for feedback actions, see Open, close, and feedback.