Overview
Most appearance settings — position, fonts, logo, dimensions, welcome message — are managed from the Dashboard and applied automatically when the widget loads. See Customization for the full list. When you use the npm SDK, you also get programmatic control over the widget’s colors and light/dark mode. This is useful when you want the widget to follow your site’s own theme toggle, or to brand it at runtime without touching the Dashboard.Theme controls are part of the SDK handle returned by
Zephlo.initialize(). They are not available through the plain script-tag (data-chatbot-id) integration.Set colors and mode at init
Pass atheme option to Zephlo.initialize():
Theme option
Colors
Each mode accepts these optional colors. Anything you leave out falls back to a polished default.Auto mode
Withmode: "auto" (the default), the widget detects the host page’s theme and matches it. It checks, in order:
- A
data-theme="dark"/data-theme="light"attribute on<html>or<body> - A
dark/lightclass on<html>(Tailwind, daisyUI, etc.) - The CSS
color-schemeproperty - The visitor’s OS preference (
prefers-color-scheme)
Change the theme at runtime
The handle exposes live properties. Assigning to them re-styles every mounted view immediately.Update a mode without switching to it
UsesetColors(mode, colors) to change colors for light or dark mode without making it active:
Follow your site’s theme toggle
A common pattern: keep the widget in sync with your own light/dark switch.auto mode and just toggle your page’s data-theme or .dark class — the widget follows along.
Next steps
Widget integration
Embedding options and Dashboard customization.
Proactive triggers
Have the agent reach out to visitors first.