CSS Variables

The agent renders inside Shadow DOM. Customize it with CSS custom properties.

Tier 1: Brand Matching

These are the essential variables:

VariableDescription
--char-color-primaryPrimary action color (send button, links)
--char-color-primary-foregroundText on primary surfaces
--char-color-backgroundMain background
--char-color-foregroundPrimary text color
--char-radiusBorder radius (e.g., 0.75rem)
--char-font-sansFont stack

Example

Add these CSS rules targeting char-agent:

char-agent {
--char-color-primary: #7c3aed;
--char-color-primary-foreground: #ffffff;
--char-color-background: #ffffff;
--char-color-foreground: #0f172a;
--char-radius: 0.75rem;
}

Tier 2: Deeper Customization

VariableDescription
--char-color-mutedSecondary surfaces
--char-color-borderBorders and dividers
--char-user-bubble-bgUser message background
--char-assistant-bubble-bgAssistant message background

Try it

Change --char-color-primary to your favorite color and see the preview update.

Powered by WebContainers
Files
Preparing Environment
  • npm install
  • npm run dev