CSS Class Reference

Complete list of all csdk-* CSS classes exposed by the SDK for targeting and customization

Every structural element in the SDK has a csdk-* class. Target any of them in your own CSS to override colors, spacing, borders, animations, or layout — no specificity hacks needed.

All csdk-* classes are additive only — they never carry layout-breaking styles on their own. The SDK's visual defaults come from Tailwind utility classes alongside them, which you can override freely.


Messages

ClassElementExample override
csdk-messageEvery message row (user + assistant + tool)Entry animation, row spacing
csdk-user-messageUser message row wrapperRow-level alignment
csdk-assistant-messageAssistant message row wrapperRow-level alignment
csdk-message-userUser message bubbleBackground, border radius, padding
csdk-message-assistantAssistant message bubbleBackground, border, padding
csdk-message-contentText content inside a bubbleFont size, line height, color
csdk-message-actionsHover-reveal action button barPositioning, visibility timing
/* Example: custom user bubble */
.csdk-message-user {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 1rem 1rem 0.25rem 1rem;
}

/* Example: tighten row spacing */
.csdk-message {
  margin-bottom: 0.25rem;
}

Avatars

ClassElementExample override
csdk-avatarAvatar container (user & assistant)Size, border, shadow
csdk-avatar-fallbackFallback initials shown when no imageColor, font
.csdk-avatar {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--primary);
}

Input

ClassElementExample override
csdk-inputInput container (the whole bar)Border, background, border-radius
csdk-input-textareaThe <textarea> inside the inputFont size, color, placeholder style
csdk-buttonAll buttons in the chatBase button reset
csdk-button-sendSend message buttonColor, size, icon
csdk-button-stopStop generation buttonColor, icon
csdk-button-attachAttachment picker buttonColor, icon
csdk-compound-inputCompound input wrapperOuter border, padding
csdk-compound-suggestionsSuggestions dropdown inside compound inputBackground, shadow, border
/* Example: pill-shaped input */
.csdk-input {
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

/* Example: custom send button color */
.csdk-button-send {
  background: #10b981;
  color: white;
}

Inline Edit

These appear when a user edits a sent message.

ClassElementExample override
csdk-edit-btnEdit trigger button (hover-reveal, left of message)Position, opacity timing
csdk-edit-textareaTextarea shown during edit modeBorder, background
csdk-edit-cancelCancel edit buttonColor, border
csdk-edit-submitSubmit edit buttonColor, background
/* Always show edit button instead of hover-only */
.csdk-edit-btn {
  opacity: 1 !important;
}

Confirmation Card

Used for tool approval prompts (PermissionConfirmation, SimpleConfirmation).

ClassElementExample override
csdk-confirm-cardThe pending confirmation cardBorder, background, border-radius
csdk-confirm-btnDeny / Allow buttonsPadding, border-radius, hover state
csdk-confirm-resultApproved / Rejected result pillBackground, border, color
/* Example: match your brand on the Allow button */
.csdk-confirm-btn:last-child {
  background: #6366f1;
}

/* Example: custom approved pill */
.csdk-confirm-result {
  border-radius: 0.375rem;
}

Layout

ClassElementExample override
csdk-chat-headerChat view header barHeight, background, border
csdk-chat-footerChat view footer areaBackground, padding, border
csdk-chat-home-viewHome/welcome view containerBackground, padding
csdk-chat-viewActive conversation view containerBackground
csdk-back-buttonBack / New chat button in headerSize, icon color
csdk-scroll-btn-layerInvisible layer that positions the scroll-to-bottom buttonpointer-events: none layer — adjust padding to reposition button
/* Example: transparent footer */
.csdk-chat-footer {
  background: transparent;
  border-top: none;
}

Overlays

These are absolutely or fixed-positioned layers. Target them to change colors, z-index, or backdrop styles.

ClassElementExample override
csdk-image-backdropFullscreen backdrop behind expanded imageBackground color, z-index
csdk-image-closeClose button inside the image lightboxPosition, background, size
csdk-dropzone-overlayDrag-and-drop overlay shown while dragging filesBorder color, background tint
csdk-attachment-loadingLoading overlay on attachment thumbnailBackground opacity
csdk-attachment-errorError overlay on failed attachmentBackground tint
csdk-mcp-loadingLoading overlay inside an MCP UI frameBackground, z-index
/* Example: darker image backdrop */
.csdk-image-backdrop {
  background: rgba(0, 0, 0, 0.92);
}

/* Example: brand-colored drop zone */
.csdk-dropzone-overlay {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-color: var(--primary);
}

Follow-up Suggestions

ClassElementExample override
csdk-followupFollow-up suggestions containerLayout, spacing, max-width
csdk-followup-buttonIndividual suggestion chip buttonsColor, border, hover state
.csdk-followup-button {
  border-radius: 999px;
  font-size: 0.75rem;
}

ClassElementExample override
csdk-branch-navigatorBranch/version navigator between message variantsVisibility, sizing

Model Selector

ClassElementExample override
csdk-model-dropdownDropdown list shown when picking a modelWidth, max-height, shadow, border
.csdk-model-dropdown {
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

Dev Tools

These classes are on the DevLogger component, which is only rendered in development mode.

ClassElement
csdk-devlogger-backdropModal backdrop overlay
csdk-devlogger-modalModal content panel

CSS Custom Properties

A few SDK-specific CSS variables complement the standard shadcn/ui variables:

VariableDefaultUsed for
--csdk-link-color#2563eb (light) / #60a5fa (dark)Hyperlink color inside message content
--csdk-dialog-foregroundInherited from --foregroundText color inside SDK-rendered dialogs
--csdk-dialog-muted-foregroundInherited from --muted-foregroundMuted text inside SDK-rendered dialogs
:root {
  --csdk-link-color: #7c3aed; /* purple links */
}

Animation Classes (Internal)

These classes are applied internally for loader animations. You can target them to adjust timing or disable animations, but they are not intended as customization hooks.

csdk-spinner-fade · csdk-thin-pulse · csdk-pulse-dot · csdk-bounce-dots · csdk-typing · csdk-wave · csdk-blink · csdk-text-blink · csdk-shimmer · csdk-loading-dots

/* Example: disable all SDK loader animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  [class*="csdk-loader"] {
    animation: none;
  }
}

Full Theme Example

Combining CSS variables + class overrides to create a fully custom look:

themes/my-brand.css
[data-csdk-theme="mybrand"] {
  --primary: hsl(258 90% 60%);
  --primary-foreground: hsl(0 0% 100%);
  --background: hsl(258 20% 98%);
  --border: hsl(258 20% 88%);
  --radius: 0.75rem;
  --csdk-link-color: hsl(258 90% 55%);
}

/* Pill-shaped input */
[data-csdk-theme="mybrand"] .csdk-input {
  border-radius: 999px;
}

/* Gradient user bubbles */
[data-csdk-theme="mybrand"] .csdk-message-user {
  background: linear-gradient(135deg, hsl(258 90% 60%), hsl(280 80% 60%));
  color: white;
}

/* Rounded suggestion chips */
[data-csdk-theme="mybrand"] .csdk-followup-button {
  border-radius: 999px;
  border-color: hsl(258 60% 80%);
  color: hsl(258 90% 50%);
}
import "./themes/my-brand.css";

<div data-csdk-theme="mybrand">
  <CopilotChat />
</div>

On this page