Theme Configuration
Pass atheme object in the widget config to customize the visual appearance:
Theme Properties
string
default:"#2D8A4E"
The primary brand color used throughout the widget. Applied to:
- Toggle button background
- Chat header background
- Send button
- User message bubbles
- Active/selected states (quick replies, checkboxes)
- Product “Add” button hover state
- Promo price highlight
- Text selection highlight
- Focus outlines
string
default:"'Inter', system-ui, -apple-system, sans-serif"
CSS font-family stack for all widget text. The widget also uses a separate monospace font (
'JetBrains Mono', ui-monospace, 'SF Mono', monospace) for prices, counters, and status indicators — this cannot be overridden.string
default:"0px"
Base border radius for the chat panel, product cards, quick reply buttons, and other elements. Inner elements automatically use
calc(var(--vz-radius) - 4px) for consistent visual nesting.Common values:'0px'— sharp corners (default)'8px'— subtle rounding'12px'— modern rounded look'16px'— heavily rounded
'light' | 'dark' | 'auto'
default:"light"
Color scheme for the widget. See the sections below for details on each mode.
string
Currency symbol displayed next to product prices and cart totals. Examples:
'$', 'EUR', 'GBP'.Light / Dark / Auto Mode
Light Mode (default)
Dark Mode
Auto Mode
@media (prefers-color-scheme: dark). Defaults to light mode and switches to dark when the OS preference changes.
Primary Color Examples
CSS Custom Properties Reference
All CSS custom properties used internally by the widget:Layout
Colors
Typography
Effects
CSS Isolation via Shadow DOM
The widget renders inside a Shadow DOM boundary, which provides full CSS isolation:- No style leaking — widget styles do not affect your page
- No style inheritance — your page styles (Tailwind, Bootstrap, etc.) do not affect the widget
- Reset via
all: initial— the:hostelement resets all inherited CSS properties
ThemeConfig API is the intended customization mechanism. You cannot target widget internals with external CSS selectors.
The Shadow DOM is created with
mode: 'open', so you can inspect the widget’s internal structure in browser DevTools. For advanced customization, you can modify CSS custom properties at runtime via JavaScript:Visual Elements
The widget consists of these visual sections: Toggle Button — a circular floating action button (56px diameter) positioned in the bottom corner of the viewport. Uses--vz-primary as the background color. Shows an unread message badge when the chat is closed and new messages arrive.
Chat Header — a colored bar at the top of the chat panel displaying the bot name, avatar, connection status indicator (green/yellow/red dot), new chat button, and close button.
Message Area — a scrollable region displaying the conversation. User messages align right with the primary color background. Bot messages align left with transparent background. Supports rich content blocks: text, product cards, quick replies, ingredient checklists, meal plans, confirmation cards, session summaries, status indicators, and error messages.
Input Area — a text area at the bottom with a circular send button. Supports multi-line input with auto-resize (max 120px height). Disabled state reduces opacity when the connection is lost.
Product Cards — a list layout showing product name, price (with promo price support), and a quantity stepper with add button. Prices use the monospace font for alignment.
Quick Replies — pill-shaped buttons that wrap to multiple lines. Clicking a reply sends it as a user message. The selected reply gets the primary color; others fade out.
Responsive Behavior
The widget automatically adapts to the viewport:- Desktop (640px+): floating panel with configured width/height, positioned in the corner
- Mobile (<640px): full-screen overlay that slides up from the bottom with safe-area inset support for notched devices
- The toggle button is fixed at the bottom of the viewport
- The toggle button hides when the chat panel is open
- The chat panel uses
100dvhfor proper height on mobile browsers with address bars - Scroll containment prevents background page scrolling
Accessibility
Built-in accessibility features:- All interactive elements meet the 44x44px minimum touch target size
- Focus indicators use a 2px outline in the primary color
- The toggle button includes
aria-labelandaria-expandedattributes prefers-reduced-motion: reducedisables all animations and transitions@media printhides the widget entirely- Scrollbar styling supports both WebKit and Firefox (
scrollbar-width: thin) APIs