A2UI Launched: Full CopilotKit support at launch!

A2UI Launched: CopilotKit has partnered with Google to deliver full support in both CopilotKit and AG-UI!

Check it out
LogoLogo
  • Overview
  • Integrations
  • API Reference
  • Copilot Cloud
Slanted end borderSlanted end border
Slanted start borderSlanted start border
  • Getting Started
  • Introduction to CopilotKit
  • LLM Quickstart
  • Agent Quickstart
  • Vibe Coding MCP
  • What's New
  • CopilotKit Features
  • Agentic Chat UI
  • Copilot Suggestions
  • Human in the Loop (HITL)
  • Generative UI
  • Frontend Actions
  • Backend Actions
  • Shared State
  • Premium Features
  • CopilotKit Premium
  • Fully Headless UI
  • Observability
  • Inspector
  • Agentic Protocols
  • Agentic Protocols
  • AG-UI (Agents<->Users)
  • MCP (Agents<->Tools)
  • A2A (Agents<->Agents)
  • Generative UI Specs
  • Generative UI Specs
  • A2UI
  • Open-JSON-UI
  • MCP-UI
  • Learning
  • Tutorial: AI Todo App
  • Tutorial: AI Travel App
  • Video: Research Canvas
  • Cookbook: State Machine
  • Troubleshooting
  • Error Debugging
  • Error Observability Connectors
  • Common Copilot Issues
  • Migrate to 1.10.X
  • Migrate to 1.8.2
  • Other
  • Integrations
  • ADK
  • A2A
  • Microsoft Agent Framework
  • AWS Strands
  • Direct to LLM
  • LangGraph
  • AutoGen2
  • Agno
  • CrewAI Crews
  • CrewAI Flows
  • LlamaIndex
  • Mastra
  • Open Agent Spec
  • Pydantic AI
Custom Look and Feel

Styling Copilot UI

CopilotKit has a variety of ways to customize colors and structures of the Copilot UI components.

  • CSS Variables
  • Custom CSS
  • Custom Icons
  • Custom Labels

If you want to customize the style as well as the functionality of the Copilot UI, you can also try the following:

  • Custom Sub-Components
  • Fully Headless UI

CSS Variables (Easiest)

The easiest way to change the colors using in the Copilot UI components is to override CopilotKit CSS variables.

Hover over the interactive UI elements below to see the available CSS variables.

Close CopilotKit
CopilotKit
Hi you! 👋 I can help you create a presentation on any topic.
Hello CopilotKit!

Powered by CopilotKit

Once you've found the right variable, you can import CopilotKitCSSProperties and simply wrap CopilotKit in a div and override the CSS variables.

import { CopilotKitCSSProperties } from "@copilotkit/react-ui";

<div
  style={
    {
      "--copilot-kit-primary-color": "#222222",
    } as CopilotKitCSSProperties
  }
>
  <CopilotSidebar .../>
</div>

Reference

CSS VariableDescription
--copilot-kit-primary-colorMain brand/action color - used for buttons, interactive elements
--copilot-kit-contrast-colorColor that contrasts with primary - used for text on primary elements
--copilot-kit-background-colorMain page/container background color
--copilot-kit-secondary-colorSecondary background - used for cards, panels, elevated surfaces
--copilot-kit-secondary-contrast-colorPrimary text color for main content
--copilot-kit-separator-colorBorder color for dividers and containers
--copilot-kit-muted-colorMuted color for disabled/inactive states

Custom CSS

In addition to customizing the colors, the CopilotKit CSS is structured to easily allow customization via CSS classes.

globals.css
.copilotKitButton {
  border-radius: 0;
}

.copilotKitMessages {
  padding: 2rem;
}

.copilotKitUserMessage {
  background: #007AFF;
}

Reference

For a full list of styles and classes used in CopilotKit, click here.

CSS ClassDescription
.copilotKitMessagesMain container for all chat messages with scroll behavior and spacing
.copilotKitInputText input container with typing area and send button
.copilotKitUserMessageStyling for user messages including background, text color and bubble shape
.copilotKitAssistantMessageStyling for AI responses including background, text color and bubble shape
.copilotKitHeaderTop bar of chat window containing title and controls
.copilotKitButtonPrimary chat toggle button with hover and active states
.copilotKitWindowRoot container defining overall chat window dimensions and position
.copilotKitMarkdownStyles for rendered markdown content including lists, links and quotes
.copilotKitCodeBlockCode snippet container with syntax highlighting and copy button
.copilotKitChatBase chat layout container handling positioning and dimensions
.copilotKitSidebarStyles for sidebar chat mode including width and animations
.copilotKitPopupStyles for popup chat mode including position and animations
.copilotKitButtonIconIcon styling within the main chat toggle button
.copilotKitButtonIconOpen .copilotKitButtonIconCloseIcon states for when chat is open/closed
.copilotKitCodeBlockToolbarTop bar of code blocks with language and copy controls
.copilotKitCodeBlockToolbarLanguageLanguage label styling in code block toolbar
.copilotKitCodeBlockToolbarButtonsContainer for code block action buttons
.copilotKitCodeBlockToolbarButtonIndividual button styling in code block toolbar
.copilotKitSidebarContentWrapperInner container for sidebar mode content
.copilotKitInputControlsContainer for input area buttons and controls
.copilotKitActivityDot1 .copilotKitActivityDot2 .copilotKitActivityDot3Animated typing indicator dots
.copilotKitDevConsoleDevelopment debugging console container
.copilotKitDevConsoleWarnOutdatedWarning styles for outdated dev console
.copilotKitVersionInfoVersion information display styles
.copilotKitDebugMenuButtonDebug menu toggle button styling
.copilotKitDebugMenuDebug options menu container
.copilotKitDebugMenuItemIndividual debug menu option styling

Custom Fonts

You can customize the fonts by updating the fontFamily property in the various CSS classes that are used in the CopilotKit.

globals.css
.copilotKitMessages {
  font-family: "Arial, sans-serif";
}

.copilotKitInput {
  font-family: "Arial, sans-serif";
}

Reference

You can update the main content classes to change the font family for the various components.

CSS ClassDescription
.copilotKitMessagesMain container for all messages
.copilotKitInputThe input field
.copilotKitMessageBase styling for all chat messages
.copilotKitUserMessageUser messages
.copilotKitAssistantMessageAI responses

Custom Icons

You can customize the icons by passing the icons property to the CopilotSidebar, CopilotPopup or CopilotChat component.

<CopilotChat
  icons={{
    // Use your own icons here – any React nodes
    openIcon: <YourOpenIconComponent />,
    closeIcon: <YourCloseIconComponent />,
  }}
/>

Reference

IconDescription
openIconThe icon to use for the open chat button
closeIconThe icon to use for the close chat button
headerCloseIconThe icon to use for the close chat button in the header
sendIconThe icon to use for the send button
activityIconThe icon to use for the activity indicator
spinnerIconThe icon to use for the spinner
stopIconThe icon to use for the stop button
regenerateIconThe icon to use for the regenerate button
pushToTalkIconThe icon to use for push to talk

Custom Labels

To customize labels, pass the labels property to the CopilotSidebar, CopilotPopup or CopilotChat component.

<CopilotChat
  labels={{
    initial: "Hello! How can I help you today?",
    title: "My Copilot",
    placeholder: "Ask me anything!",
    stopGenerating: "Stop",
    regenerateResponse: "Regenerate",
  }} 
/>

Reference

LabelDescription
initialThe initial message(s) to display in the chat window
titleThe title to display in the header
placeholderThe placeholder to display in the input
stopGeneratingThe label to display on the stop button
regenerateResponseThe label to display on the regenerate button
PREV
Prebuilt Copilot UI
Slanted end borderSlanted end border
Slanted start borderSlanted start border
NEXT
Custom Sub-Components

On this page

CSS Variables (Easiest)
Reference
Custom CSS
Reference
Custom Fonts
Reference
Custom Icons
Reference
Custom Labels
Reference