Chatwik
Website Live Chat

Dark Mode Setup

Learn how to enable and configure dark mode for the Chatwik live chat widget on your website.

Modern websites enable users to switch between light and dark modes. A live chat widget that adapts to both themes ensures a consistent user experience. This guide helps you set up dark mode for the Chatwik live-chat widget on your website.


Configuring Dark Mode

To enable dark mode on your Chatwik live chat widget, pass the darkMode parameter inside your window.chatwikSettings object.

Supported darkMode Options

  • light: Forces light mode only (Default value).
  • auto: Automatically switches between light and dark modes based on the user's operating system or browser preference.

Code Example

Add darkMode: "auto" to your Chatwik widget settings before loading the script:

chatwikSettings.js
window.chatwikSettings = {
  hideMessageBubble: false,
  position: "right",
  locale: "en",
  type: "standard",
  darkMode: "auto", // Enables automatic dark mode based on OS preference
};

Note

Currently, darkMode: "light" (forced light) and darkMode: "auto" (system preference) are supported. Support for forcing dark mode continuously (darkMode: "dark") is planned for future releases.

On this page