Customize the widget from Kommander.ai settings first. Runtime CSS overrides should be used only for host-page layout constraints or carefully scoped brand refinements.

Settings-Driven Customization

OptionWhere to configureEffect
Assistant nameSettings > CustomizationHeader name and welcome message.
Brand colorSettings > CustomizationLauncher, header, user messages, and primary actions.
Widget imageSettings > CustomizationReplaces the default launcher icon with your uploaded image.
LanguageSettings > CustomizationDefault widget UI language.
Automatic language detectionSettings > CustomizationUses the visitor browser language and first message language when enabled.
Preset messagesSettings > PresetsShows up to 5 quick-start buttons above the input.
Branding visibilitySettings > CustomizationControls the Kommander.ai footer mark when plan settings allow it.

The hosted widget refreshes settings when it loads. If you change settings in Kommander.ai, reload the host page to verify the new appearance.

Runtime Options

window.initKommanderChatbot({ userId: "YOUR_KOMMANDER_USER_ID", containerId: "kommander-chatbot", timerEnabled: false, userData: { plan: "pro", locale: "en" } });

userData is for analytics and non-secret routing attributes. Do not use it for trusted authorization; use Identity Verification for that.

CSS Variables

The widget stylesheet exposes these variables on :root and updates the primary colors from Kommander.ai settings:

:root { --kommander-primary-color: #1a1a1a; --kommander-secondary-color: #2a2a2a; --kommander-header-text-color: #fff; --kommander-bg-light: #fff; --kommander-border-color: #d1d5db; --kommander-input-bg: #fff; --kommander-input-text: #000; --kommander-user-message-bg: var(--kommander-primary-color); --kommander-assistant-message-bg: var(--kommander-bg-light); }

Prefer setting the brand color in Kommander.ai. If you override variables in host CSS, place the override after the widget script has loaded its stylesheet.

Scoped CSS Overrides

Use widget class names only when a host page has a real layout conflict. Keep overrides narrow and test mobile and desktop.

.kommander-button-wrapper { bottom: calc(20px + env(safe-area-inset-bottom)); right: 20px; } @media (min-width: 640px) { .kommander-window { max-height: calc(100dvh - 120px); } }

Common classes include:

ClassPurpose
.kommander-button-wrapperFixed launcher position.
.kommander-buttonLauncher button surface.
.kommander-windowOpen chat window.
.kommander-headerHeader bar.
.kommander-messagesScrollable message area.
.kommander-inputVisitor input.

Styling Guidelines

  • Keep the widget above cookie banners, sticky footers, and mobile safe areas.
  • Do not hide the close button or input.
  • Do not set a z-index higher than the widget unless another overlay must temporarily win.
  • Avoid global CSS rules targeting button, input, svg, or div without scoping; they can unintentionally affect the widget.
  • Test at widths below 640px, where the widget opens as a full-screen mobile surface.