Skip to main content

Theming

AgentsKit components are headless by default. Import the optional theme for a polished chat UI.

Default Theme

import '@agentskit/react/theme'

Includes light and dark mode support via prefers-color-scheme or data-theme attribute.

CSS Custom Properties

Override any token to customize the theme:

:root {
--ak-color-bubble-user: #10b981;
--ak-color-button: #10b981;
--ak-radius: 16px;
--ak-font-family: 'Inter', sans-serif;
}

Available Tokens

TokenDefault (light)Description
--ak-color-bg#ffffffPage background
--ak-color-surface#f9fafbSurface/card background
--ak-color-border#e5e7ebBorder color
--ak-color-text#111827Primary text
--ak-color-text-muted#6b7280Secondary text
--ak-color-bubble-user#2563ebUser message bubble
--ak-color-bubble-assistant#f3f4f6Assistant message bubble
--ak-color-button#2563ebButton background
--ak-font-familySystem font stackFont family
--ak-font-size14pxBase font size
--ak-radius8pxBorder radius
--ak-spacing-*4-24pxSpacing scale (xs, sm, md, lg, xl)

Dark Mode

Automatic via prefers-color-scheme, or force it:

<div data-theme="dark">
<ChatContainer>...</ChatContainer>
</div>

Fully Custom Styling

Skip the theme entirely and style using data-ak-* attribute selectors:

[data-ak-chat-container] { /* your styles */ }
[data-ak-role="user"] [data-ak-content] { /* user bubble */ }
[data-ak-role="assistant"] [data-ak-content] { /* assistant bubble */ }