Articles in this section
Category / Section

Enhancing the Live Chat Widget with Custom CSS and JavaScript

Updated: Jun 13, 2025

The Advanced Customization feature allows you to tailor the appearance and behavior of your live chat widget to better user experience. Using Custom CSS and Custom JS, you can apply detailed styling and functional enhancements beyond the default settings.

To access and manage Advanced Customization:

  1. Go to Admin > Chat > Live Chat.

Add_Widget.png

  1. Select an existing widget to edit or click Add Widget to create a new one.
  2. Navigate to Widget Customization > Advanced Customization.

Advanced_Customization.png

How to Add Custom CSS

Custom CSS allows you to modify the visual appearance of the Live Chat Widget. Follow the steps below to add or edit custom CSS styles:

  1. Click the Add Custom CSS to open the custom CSS editor.

Add_Custom_CSS.png

  1. Enter your CSS code and click Add to apply it.

Add_Custom_CSS_Editor.png

  1. Use the edit or delete icons to update or remove existing styles.

Edit_Custom_CSS.png

How to Add Custom JS

Custom JS allows you to control the behavior and functionality of your live chat widget. Follow the steps below to add or edit custom JS:

  1. Click the Add Custom JS to open the custom JS editor.

Add_Custom_JS.png

  1. Enter your JS code and click Add to apply it.

Add_Custom_JS_Editor.png

  1. Use the edit or delete icons to update or remove existing scripts.

Edit_Custom_JS.png

Customizing Widget Header with Custom CSS

This example shows how to use custom CSS to change the color of the live chat widget’s title and header description. Likewise, you can customize other parts of the widget with your own styles.

.title-container { .title, .title-desc { color: #800080 !important; } } 

Sample_Chat_Widget_Custom_CSS.png

Customizing Widget Menu with Custom JS

This example demonstrates how to use custom JS to add a close button inside the menu popup that triggers the chat widget’s close functionality. Similarly, you can use custom JS to implement other custom features in the widget.

window.$boldChat = window.$boldChat || [];

// Add "Close Widget" option to the menu
window.$boldChat.push(["do:addOption", "Close Widget"]);

// Add event listener for menu option clicks
window.$boldChat.push(["on:moreOptionClick", onMoreOptionClick]);

// Function to handle menu option clicks
function onMoreOptionClick(item) {
 if (item.name === "Close Widget") {
   // Close the chat widget
   window.$boldChat.push(["do:setIsOpen", false]);
 }
} 

Sample_Chat_Widget_Custom_JS.png

Note :

  • Any custom code you add to the widget is your responsibility. Please take care when making these modifications because they could impact your customer experience.
  • When incorporating CSS or JS, please use proper syntax.
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied