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.
Class Element Example override csdk-messageEvery message row (user + assistant + tool) Entry animation, row spacing csdk-user-messageUser message row wrapper Row-level alignment csdk-assistant-messageAssistant message row wrapper Row-level alignment csdk-message-userUser message bubble Background, border radius, padding csdk-message-assistantAssistant message bubble Background, border, padding csdk-message-contentText content inside a bubble Font size, line height, color csdk-message-actionsHover-reveal action button bar Positioning, visibility timing
/* Example: custom user bubble */
.csdk-message-user {
background : linear-gradient ( 135 deg , #6366f1 , #8b5cf6 );
border-radius : 1 rem 1 rem 0.25 rem 1 rem ;
}
/* Example: tighten row spacing */
.csdk-message {
margin-bottom : 0.25 rem ;
}
Class Element Example override csdk-avatarAvatar container (user & assistant) Size, border, shadow csdk-avatar-fallbackFallback initials shown when no image Color, font
.csdk-avatar {
width : 2 rem ;
height : 2 rem ;
border : 2 px solid var ( --primary );
}
Class Element Example override csdk-inputInput container (the whole bar) Border, background, border-radius csdk-input-textareaThe <textarea> inside the input Font size, color, placeholder style csdk-buttonAll buttons in the chat Base button reset csdk-button-sendSend message button Color, size, icon csdk-button-stopStop generation button Color, icon csdk-button-attachAttachment picker button Color, icon csdk-compound-inputCompound input wrapper Outer border, padding csdk-compound-suggestionsSuggestions dropdown inside compound input Background, shadow, border
/* Example: pill-shaped input */
.csdk-input {
border-radius : 999 px ;
padding : 0.25 rem 0.75 rem ;
}
/* Example: custom send button color */
.csdk-button-send {
background : #10b981 ;
color : white ;
}
These appear when a user edits a sent message.
Class Element Example override csdk-edit-btnEdit trigger button (hover-reveal, left of message) Position, opacity timing csdk-edit-textareaTextarea shown during edit mode Border, background csdk-edit-cancelCancel edit button Color, border csdk-edit-submitSubmit edit button Color, background
/* Always show edit button instead of hover-only */
.csdk-edit-btn {
opacity : 1 !important ;
}
Used for tool approval prompts (PermissionConfirmation, SimpleConfirmation).
Class Element Example override csdk-confirm-cardThe pending confirmation card Border, background, border-radius csdk-confirm-btnDeny / Allow buttons Padding, border-radius, hover state csdk-confirm-resultApproved / Rejected result pill Background, 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.375 rem ;
}
Class Element Example override csdk-chat-headerChat view header bar Height, background, border csdk-chat-footerChat view footer area Background, padding, border csdk-chat-home-viewHome/welcome view container Background, padding csdk-chat-viewActive conversation view container Background csdk-back-buttonBack / New chat button in header Size, icon color csdk-scroll-btn-layerInvisible layer that positions the scroll-to-bottom button pointer-events: none layer — adjust padding to reposition button
/* Example: transparent footer */
.csdk-chat-footer {
background : transparent ;
border-top : none ;
}
These are absolutely or fixed-positioned layers. Target them to change colors, z-index, or backdrop styles.
Class Element Example override csdk-image-backdropFullscreen backdrop behind expanded image Background color, z-index csdk-image-closeClose button inside the image lightbox Position, background, size csdk-dropzone-overlayDrag-and-drop overlay shown while dragging files Border color, background tint csdk-attachment-loadingLoading overlay on attachment thumbnail Background opacity csdk-attachment-errorError overlay on failed attachment Background tint csdk-mcp-loadingLoading overlay inside an MCP UI frame Background, 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 );
}
Class Element Example override csdk-followupFollow-up suggestions container Layout, spacing, max-width csdk-followup-buttonIndividual suggestion chip buttons Color, border, hover state
.csdk-followup-button {
border-radius : 999 px ;
font-size : 0.75 rem ;
}
Class Element Example override csdk-branch-navigatorBranch/version navigator between message variants Visibility, sizing
Class Element Example override csdk-model-dropdownDropdown list shown when picking a model Width, max-height, shadow, border
.csdk-model-dropdown {
border-radius : 0.75 rem ;
box-shadow : 0 8 px 24 px rgba ( 0 , 0 , 0 , 0.12 );
}
These classes are on the DevLogger component, which is only rendered in development mode.
Class Element csdk-devlogger-backdropModal backdrop overlay csdk-devlogger-modalModal content panel
A few SDK-specific CSS variables complement the standard shadcn/ui variables:
Variable Default Used for --csdk-link-color#2563eb (light) / #60a5fa (dark)Hyperlink color inside message content --csdk-dialog-foregroundInherited from --foreground Text color inside SDK-rendered dialogs --csdk-dialog-muted-foregroundInherited from --muted-foreground Muted text inside SDK-rendered dialogs
:root {
--csdk-link-color : #7c3aed ; /* purple links */
}
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 ;
}
}
Combining CSS variables + class overrides to create a fully custom look:
[ 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.75 rem ;
--csdk-link-color : hsl ( 258 90 % 55 % );
}
/* Pill-shaped input */
[ data-csdk-theme = "mybrand" ] .csdk-input {
border-radius : 999 px ;
}
/* Gradient user bubbles */
[ data-csdk-theme = "mybrand" ] .csdk-message-user {
background : linear-gradient ( 135 deg , hsl ( 258 90 % 60 % ), hsl ( 280 80 % 60 % ));
color : white ;
}
/* Rounded suggestion chips */
[ data-csdk-theme = "mybrand" ] .csdk-followup-button {
border-radius : 999 px ;
border-color : hsl ( 258 60 % 80 % );
color : hsl ( 258 90 % 50 % );
}
import "./themes/my-brand.css" ;
< div data-csdk-theme = "mybrand" >
< CopilotChat />
</ div >