Sign inStart for free
ConvoWeb Package
IntroductionPrerequisitesInstallationProject setupQuick start
Package structureConfigurationComponentsHooksAPI integrationSocket events
OverviewReplace entire UIReplace componentsStyle with classNamesThemes & localePhone & video callingIn-call control barTranslationsFeatures
Everyday chat toolsEvent callbacksUnread badgeRich-text messagesPins, stars & datesMessage threadsMentionsCanvas & draftsNotificationsAdmin permissionsServer refusalsSession & token refresh
Host app integrationTroubleshootingFAQVersion historyBest practicesSupport & contact
Web packageCustomization

Themes & locale

Brand color, light/dark mode, locale and time, fonts, and every design token.

Brand color (themeColor)

themeColor accepts any CSS color. The package turns it into a full accessible palette - accent, fills, soft bubbles, selected and hover washes - for both light and dark mode.

FormatExample
Hex"#7c3aed", "#abc"
Named color"blue", "rebeccapurple", "tomato"
rgb() / rgba()"rgb(124, 58, 237)", "rgb(124 58 237 / 1)"
hsl() / hsla()"hsl(258 90% 58%)"
CSS variable"var(--primary)", "var(--brand-color)"
Modern CSS colors"oklch(0.55 0.2 280)", "color-mix(in srgb, blue 80%, white)"
tsx
1<ChatMain {...chatConfig} themeColor="#7c3aed" />2<ChatMain {...chatConfig} themeColor="royalblue" />3<ChatMain {...chatConfig} themeColor="var(--primary)" />   // host design token4<ChatMain {...chatConfig} themeColor="hsl(220 70% 50%)" />

At runtime it updates --chat-theme, --chat-theme-fill, --chat-theme-fg, --chat-theme-5…--chat-theme-60, --chat-selected, --chat-hover and the outgoing-bubble tokens.

Note

A var(--…) value is resolved in the browser against your document - define it on :root(or an ancestor) before mount. If it's missing or transparent, the package falls back to a default blue accent.

Light / dark mode

Switching animates surfaces, text, borders, bubbles and brand washes over about 250ms, and respects prefers-reduced-motion. The toggle lives in Account settings, next to push notifications.

PatternProps
Your app controls the theme (e.g. an admin template)colorMode={mode} onColorModeChange={setMode} showColorModeToggle={false}
Chat manages its own themedefaultColorMode="light" (built-in toggle shown in settings)
Start darkdefaultColorMode="dark"

Date / time

tsx
1<ChatMain2  {...chatConfig}3  locale="en-GB"4  timeZone="Europe/London"5  hour12={false}6  showDateTimeSettings={false}7  onDateTimePreferencesChange={(prefs) => console.log(prefs)}8/>

Font family & size

fontFamilyis any CSS font-family value and applies to the whole chat - the page shell and portalled menus, dialogs and drawers alike. Leave it out and chat keeps inheriting your app's font.

tsx
<ChatMain {...chatConfig} fontFamily="Inter, system-ui, sans-serif" />

fontSize works per text role, so a bigger conversation title doesn't also blow up timestamps:

RoleWhere it landsDefault
titleConversation name, drawer / dialog titles, sidebar rows14px / 13px / 0.75rem per surface
subtitleHeader status line, sidebar last-message preview11px
descriptionField labels, timestamps, menu section labels10–11px
baseMessage bubbles, menu items, detail values13px / 13.5px

One value sets base and scales the rest with it (title ×1.08, subtitle ×0.92, description ×0.85). An object sets roles independently - roles you leave out keep the package default:

tsx
1<ChatMain {...chatConfig} fontSize={15} />        // px2<ChatMain {...chatConfig} fontSize="1rem" />      // any CSS length3 4<ChatMain5  {...chatConfig}6  fontFamily="Inter, sans-serif"7  fontSize={{ base: 14, title: 18, subtitle: 13, description: 11 }}8/>9 10// Only titles change; everything else stays as shipped11<ChatMain {...chatConfig} fontSize={{ title: "1.25rem" }} />

These set --chat-font-family, --chat-font-size, --chat-font-size-title, --chat-font-size-subtitle and --chat-font-size-description on the chat root. Custom slots pick them up through the exported class recipes (chatSheetTitleClass, chatSheetSubtitleClass, chatDetailLabelClass, …) or by reading the variables:

css
1.my-custom-drawer-title {2  font-size: var(--chat-font-size-title, 13px);3}

Display density (density)

Account settings has a Comfortable / Compactswitch next to the font settings. Compact tightens the gap between messages, the padding inside text bubbles and the height of chat list rows. The user's choice is saved on the device (localStorage, key chat-density).

tsx
1<ChatMain {...chatConfig} defaultDensity="compact" />          // starting value2<ChatMain {...chatConfig} density={d} onDensityChange={setD} /> // you own the value3<ChatMain {...chatConfig} showDensityToggle={false} />          // hide the switch

Compact mode only sets these variables, so you can also tune them in CSS: --chat-density-row-gap, --chat-density-row-gap-tight, --chat-density-bubble-px, --chat-density-bubble-py, --chat-density-list-py. buildChatDensityStyles(density) is exported from the design-system entry for custom shells.

Design tokens (themeTokens)

Every color, border, radius and shadow reads a --chat-* token. themeTokens overrides any of them, separately for light and dark. They apply everywhere - sidebar, header, bubbles, menus, drawers, modals, tooltips, the in-call UI and the call pop-up window - and win over both the defaults and the palette from themeColor.

tsx
1<ChatMain2  {...chatConfig}3  themeColor="#0f766e"4  themeTokens={{5    light: {6      "--chat-incoming-bubble": "#f1f5f9",7      "--chat-outgoing-bubble": "#ccfbf1",8      "--chat-bubble-radius": "18px",9      "--chat-border-color": "#e2e8f0",10      "--chat-main-bg": "#ffffff",11    },12    dark: {13      "--chat-incoming-bubble": "#1e293b",14      "--chat-outgoing-bubble": "#134e4a",15      "--chat-bubble-radius": "18px",16      "--chat-border-color": "rgba(255,255,255,0.08)",17    },18  }}19/>

For a value in both modes, put it in both maps (spread one shared object into each). Keys that don't start with --chat- are ignored.

AreaTokens
Surfaces--chat-canvas, --chat-main-bg, --chat-surface, --chat-elevated, --chat-input-bg, --chat-search-bg, --chat-toolbar-bg
Text--chat-text, --chat-text-secondary, --chat-muted
Borders--chat-border-color, --chat-section-border, --chat-section-radius, --chat-date-pill-border
Message bubbles--chat-incoming-bubble, --chat-incoming-text, --chat-outgoing-bubble, --chat-outgoing-text, --chat-bubble-radius, --chat-bubble-radius-joined
Brand (from themeColor)--chat-theme, --chat-theme-fill, --chat-theme-fg, --chat-theme-5 … --chat-theme-60
Hover / selected--chat-hover-color, --chat-selected
Status--chat-danger-*, --chat-warning-*, --chat-success-*, --chat-online, --chat-unread-badge
Pins, stars, receipts--chat-pin-color, --chat-star-color, --chat-highlight-ring, --read-tick-color
Avatars (no image)--chat-accent-1 … --chat-accent-6
Shadows--chat-shadow, --chat-shadow-menu, --chat-shadow-overlay, --chat-shadow-bar
Scrollbars--chat-scrollbar
Modals / controls--chat-backdrop, --chat-switch-thumb, --chat-date-pill-bg, --chat-empty-icon-bg
Call UI (always dark)--chat-call-bg, --chat-call-bg-deep, --chat-call-bg-edge, --chat-call-raised, --chat-call-tile, --chat-call-fg, --chat-call-on-fg, --chat-call-danger*, --chat-call-success, --chat-call-speaking, --chat-call-warning*, --chat-call-accent*

Tip

themeTokens sets values, classNames adds classes to a region, components replaces a region. Use whichever is smallest for the change you want. In composable mode, pass themeTokens to ChatThemeProvider.
PreviousStyle with classNamesNextPhone & video calling

On this page

Brand color (themeColor)Light / dark modeDate / timeFont family & sizeDisplay density (density)Design tokens (themeTokens)
Back to top