| title |
<CopilotChat /> |
| description |
An embeddable chat panel for CopilotKit. |
{/* GENERATE-DOCS path=packages/react-ui/src/components/chat/Chat.tsx component=CopilotChat */}

A chatbot panel component for the CopilotKit framework. The component allows for a high degree
of customization through various props and custom CSS.
```jsx CopilotChat Example
import { CopilotChat } from "@copilotkit/react-ui";
<CopilotChat
labels={{
title: "Your Assistant",
initial: "Hi! 👋 How can I assist you today?",
}}
/>
</RequestExample>
## Custom CSS
You can customize the colors of the panel by overriding the CSS variables
defined in the [default styles](https://github.com/CopilotKit/CopilotKit/blob/main/CopilotKit/packages/react-ui/src/css/colors.css).
For example, to set the primary color to purple:
```jsx
<div style={{ "--copilot-kit-primary-color": "#7D5BA6" }}>
<CopilotPopup />
</div>
To further customize the panel, you can override the CSS classes defined
here.
For example:
.copilotKitButton {
border-radius: 0;
}
Custom instructions to be added to the system message. Use this property to
provide additional context or guidance to the language model, influencing
its responses. These instructions can include specific directions,
preferences, or criteria that the model should consider when generating
its output, thereby tailoring the conversation more precisely to the
user's needs or the application's requirements.
A callback that gets called when the in progress state changes.
A callback that gets called when a new message it submitted.
Icons can be used to set custom icons for the chat window.
Labels can be used to set custom labels for the chat window.
A function that takes in context string and instructions and returns
the system message to include in the chat request.
Use this to completely override the system message, when providing
instructions is not enough.
Whether to show the response button.
A custom Messages component to use instead of the default.
A custom Input component to use instead of the default.
A custom ResponseButton component to use instead of the default.
A class name to apply to the root element.
Children to render.