This page demonstrates the dark mode functionality with different configurations. Test each mode by scrolling through the examples below.
--chat-primary-color, --chat-background-color, etc.data-theme="light" or data-theme="dark" on the containerConfiguration: data-dark-mode="automatic"
This widget automatically switches between light and dark themes based on your system/browser preference.
Try it: Change your OS dark mode setting or use DevTools to emulate dark mode preference.
Configuration: data-dark-mode="on"
This widget is always in dark mode, regardless of system preference.
Expected: Dark background, light text, adjusted colors for dark theme.
Configuration: data-dark-mode="off" (or omitted)
This widget is always in light mode, regardless of system preference.
Expected: Light background, dark text, standard colors.
Configuration: Custom light and dark theme colors via data-theme-light and data-theme-dark
This shows custom color palettes for both light and dark modes.
Light theme: Blue primary (#2196F3), light backgrounds
Dark theme: Purple primary (#9C27B0), dark backgrounds
Configuration: No dark mode attributes provided
When no dark mode configuration is specified, the widget uses system defaults.
Expected: Automatic mode with default light theme (blue #007bff) and dark theme (light blue #4dabf7).
Behavior: Follows system preference with default color schemes.
Configuration: Only data-primary-color (no dark mode attributes)
For backward compatibility, if only data-primary-color is provided, it creates basic light and dark themes using that color.
Expected: Green primary color (#4CAF50) in both light and dark modes with system defaults for other colors.
Note: This is the legacy fallback - new implementations should use data-theme-light and data-theme-dark.
Configuration: Custom fonts loaded via data-font-assets array
Demonstrates loading custom fonts that are applied widget-scoped (won't affect parent page).
Font: Custom font loaded from URL and applied via theme fontFamily
Note: Font is scoped to this widget instance only.
Configuration: Voice features enabled with data-voice-enabled="true"
Purpose: Test the Safari Mobile warning banner that appears when voice is enabled on Safari mobile devices.
Testing Instructions:
โ ๏ธ Note: To simulate Safari mobile in Chrome DevTools, you need to change the user agent to Safari Mobile.