Skip to main content

Configurations

The CMND Embed Widget offers extensive customization through two types of configurations:

  1. Hardcoded configurations: Set during initialization
  2. Inherited configurations: Managed through the CMND dashboard

Hardcoded Configurations

These configurations are specified directly in the object passed to the init command when embedding the widget on your site.

ParameterTypeDescriptionDefault
hide_default_launcherBooleanHides the widget by default until explicitly shownfalse
custom_launcher_selectorStringPlaces the widget inside a custom element with the specified IDNone

Example 1: Hide Default Launcher

JavaScript
cmndChat("init", {
chatbot_id: "YOUR_CHATBOT_ID",
organization_id: "YOUR_ORGANIZATION_ID",
hide_default_launcher: true,
});

Example 2: Custom Launcher Selector

JavaScript
cmndChat("init", {
chatbot_id: "YOUR_CHATBOT_ID",
organization_id: "YOUR_ORGANIZATION_ID",
custom_launcher_selector: "my-div",
});

This will place the widget inside the HTML element with id="my-div":

HTML
<div id="my-div"></div>

Using Multiple Configurations

You can combine multiple configurations in a single initialization:

JavaScript
cmndChat("init", {
chatbot_id: "YOUR_CHATBOT_ID",
organization_id: "YOUR_ORGANIZATION_ID",
custom_launcher_selector: "my-div",
hide_default_launcher: true,
});
tip

The order of configuration parameters doesn't matter.

Inherited Configurations

These configurations are set through the CMND Dashboard and automatically applied to your widget. They control the visual appearance and behavior of the widget.

Message Bubble Styles

ParameterDescription
messageBubbleBorderRadiusBorder radius of all message bubbles
userMessageBubbleBgColorBackground color of user message bubbles
responseMessageBubbleBgColorBackground color of bot response bubbles
userMessageBubbleTextColorText color of user messages
responseMessageBubbleTextColorText color of bot responses

Widget Container Styles

ParameterDescription
widgetBgColorBackground color of the entire widget
widgetTextColorDefault text color throughout the widget
widgetBorderRadiusBorder radius of the main widget container
widgetShadowIntensityShadow intensity around the widget
widgetAnimationAnimation style for the widget
fontFamilyFont family used throughout the widget

Widget Button Styles

ParameterDescription
widgetButtonBorderRadiusBorder radius of the launcher button
widgetButtonBgColorBackground color of the launcher button
widgetButtonIconColorDefault color of icons in the launcher button
widgetButtonClosedIconColorColor of the icon when widget is closed
widgetButtonOpenedIconColorColor of the icon when widget is open
widgetButtonPositionButton position ("left" or "right")

Icon Styles

ParameterDescription
sendIconColorColor of the send message icon
sendIconBgColorBackground color behind the send icon
newChatIconcolorColor of the new chat icon
expandIconColorColor of the expand widget icon
minimiseIconColorColor of the minimize widget icon
iconSizeSize of icons throughout the widget

Input Field Styles

ParameterDescription
inputBgColorBackground color of the message input field
inputBorderColorBorder color of the message input field
inputBorderRadiusBorder radius of the message input field
inputTextColorText color in the message input field
inputTextSizeFont size of text in the input field
inputPlaceholderTextPlaceholder text shown in the empty input field
inputPlaceholderColorColor of the placeholder text
ParameterDescription
titleTextText displayed in the widget header
subTitleTextSubtitle text displayed in the widget header
titleFontSizeFont size of the title text
subTitleFontSizeFont size of the subtitle text
footerTextColorText color in the widget footer
avatarImageUrlURL to a custom avatar image

Loading Indicator Style

ParameterDescription
loadingDotColorColor of the loading indicator dots
info

To modify any of these inherited configurations:

  1. Navigate to your chatbots in your CMND Dashboard
  2. Select your embed widget chatbot settings
  3. Select the Theme tab
  4. Make your desired customizations
  5. Save changes

Your styling changes will be automatically applied to all instances of your widget without requiring code updates.