Theming and labels
Set in Appearance (or PATCH /v1/admin/tenant { theme }, which replaces the whole theme). Changes reach your site within a minute, with no new embed code.
Theme fields
Section titled “Theme fields”| Field | Effect |
|---|---|
primaryColor, primaryContrastColor |
Header, buttons and the visitor’s bubbles, and their text colour |
backgroundColor, textColor, botBubbleColor |
Panel background, text, assistant bubbles |
borderRadius |
0–40 px |
fontFamily |
Any CSS font stack. The widget does not load fonts; use one the page already loads. |
position |
left or right |
launcherIcon |
chat, message, help or sparkles |
logoUrl, title |
Header logo (24 px high, at most 120 px wide) and title |
assistantName |
The assistant’s persona name (up to 40 characters). The model introduces itself with it, and {name} in the welcome message becomes this name. Unset: an unnamed assistant, and {name} reads as the localized “your assistant”. |
welcomeMessage |
First bubble on an empty chat. Markdown, shown only in the widget, never sent to the model. {name} is replaced with the assistant name. |
labels |
Label overrides per language (see below) |
customCss |
Up to 4,000 characters, injected inside the widget’s shadow root |
defaultExpanded |
Open in full screen unless the visitor chose otherwise |
Colours must be hex (#rgb, #rrggbb or #rrggbbaa).
CSS variables
Section titled “CSS variables”The theme maps to variables on the widget root, which customCss can also use or override:
| Variable | Default | From |
|---|---|---|
--cb-color |
#2563eb |
primaryColor, or the embed’s color |
--cb-color-contrast |
#ffffff |
primaryContrastColor |
--cb-bg |
#ffffff |
backgroundColor |
--cb-fg |
#111827 |
textColor |
--cb-bubble-bot |
#f3f4f6 |
botBubbleColor |
--cb-radius |
16px |
borderRadius |
--cb-font |
system UI stack | fontFamily |
--cb-muted, --cb-border, --cb-z |
grey, light grey, 2147483000 | customCss only |
Useful class names inside the shadow root: .cb-launcher, .cb-panel, .cb-header, .cb-messages, .cb-msg.user, .cb-msg.assistant, .cb-composer, .cb-banner, .cb-account-bar, .cb-component[data-kind], and the .cb-c-* classes of the built-in component templates.
Labels
Section titled “Labels”Each label resolves in this order, the last one winning:
- The built-in locale (
en,tr,de,fr,nl,es) theme.title(for the title)theme.labels['*']theme.labels[locale], for exampletrtheme.labels[fullTag], for examplept-br- The
labelsembed option, ordata-title
Keys: title, subtitle (second line in the header), assistantName, welcomeMessage, inputPlaceholder, send, stop, typing, attachImage, removeImage, imageTooLarge, error, escalated, solved, closed, newConversation, open, close, expand, collapse, signIn, signInPrompt, signedIn, signedInAs (with {name}), myOrders, poweredBy.
Full screen
Section titled “Full screen”The header’s expand button turns the floating panel into a centred panel (min(1100px, 100vw − 48px) wide, 100dvh − 48px high) with a backdrop and a 960 px reading column, which suits product comparisons. Escape or a click on the backdrop collapses it.
- The visitor’s choice is remembered in
localStorageunderhelpvane:expanded. - Without a stored choice: the embed option
expandedordata-expandedwins, otherwisetheme.defaultExpanded. - The host can call
window.Helpvane.expand(),collapse()ortoggleExpand(). - At 480 px and below, the panel is always full screen, and the expand button and backdrop are hidden.
- While the panel covers the viewport (a phone, or expanded), the host page does not scroll behind it; see Embed with a script tag.
- The expanded state is the class
cb-expandedon.cb-root.
Full screen is part of the script embed.