chat.load() function.
Using built-in styling options
You can control the widget’s appearance directly in yourchat.load() configuration using the assistant object. Here’s an example with the available styling parameters:
Visual & Behavioral Overrides
These override the remote publishing configuration fetched from the Voiceflow API. All fields are optional but local overrides take priority over remote settings.Widget Type
| Property | Type | Description |
|---|---|---|
type | 'chat' or 'voice' | Widget type |
renderMode | 'widget' or 'popover' | Chat render mode |
Header
| Property | Type | Description |
|---|---|---|
header.hideImage | boolean | Hide the header image |
header.imageUrl | string | Custom header image URL |
header.title | string | Custom header title |
Welcome Banner
| Property | Type | Description |
|---|---|---|
banner.hide | boolean | Hide the welcome banner |
banner.title | string | Banner title |
banner.description | string | Banner description |
banner.imageUrl | string | Banner image URL |
Agent Avatar
| Property | Type | Description |
|---|---|---|
avatar.hide | boolean | Hide the agent avatar |
avatar.imageUrl | string | Custom avatar image URL |
Input
| Property | Type | Description |
|---|---|---|
inputPlaceholder | string | Input field placeholder text |
Launcher
| Property | Type | Description |
|---|---|---|
launcher.type | 'icon' or 'label' | Launcher button style |
launcher.label | string | Text label for the launcher |
launcher.imageUrl | string | Custom launcher image URL |
Footer
| Property | Type | Description |
|---|---|---|
footer.hide | boolean | Hide the footer link |
footer.linkText | string | Footer link text |
footer.linkUrl | string | Footer link URL |
Appearance
| Property | Type | Description |
|---|---|---|
color | string | Primary brand color (see Color section below) |
palette | Palette | Full color palette override (see Palette section below) |
fontFamily | string | Font family name (use 'inherit' for page font) |
Position
| Property | Type | Description |
|---|---|---|
side | 'left' or 'right' | Widget position side |
spacing.side | string | Distance from the side edge (see Spacing section below) |
spacing.bottom | string | Distance from the bottom edge (see Spacing section below) |
AI Disclaimer
| Property | Type | Description |
|---|---|---|
aiDisclaimer.hide | boolean | Hide the AI disclaimer |
aiDisclaimer.text | string | Disclaimer text |
Behavior
| Property | Type | Description |
|---|---|---|
streamingDisabled | boolean | Disable streaming message animation |
persistence | 'localStorage' or 'memory' | Session persistence strategy |
External Additions
| Property | Type | Description |
|---|---|---|
stylesheet | string | Custom CSS stylesheet URL |
extensions | AnyExtension[] | Custom extensions |
Color, Palette, and Spacing
color
Type: string (any valid CSS color parseable by chroma-js)
Default: #387dff
The primary brand color used throughout the widget (buttons, links, active states, header accents). The value is parsed by chroma-js, which supports multiple formats:
| Format | Example | Notes |
|---|---|---|
| Hex (6-digit) | #387dff | Most common, recommended |
| Hex (3-digit) | #38f | Shorthand hex |
| Hex with alpha | #387dff80 | 8-digit hex with alpha |
| Named CSS color | tomato, cornflowerblue | CSS named colors |
| RGB | rgb(56, 125, 255) | CSS rgb() function |
| HSL | hsl(220, 100%, 61%) | CSS hsl() function |
color is provided without a palette, the widget auto-generates a full 10-shade palette using HSL interpolation. The color value becomes shade 500 (the base), and lighter/darker shades are computed by varying the lightness.
Examples:
palette
Type: Object with 10 required shade keys (all hex strings)
Default: Auto-generated from color via HSL interpolation
A full color palette that gives you precise control over every shade the widget uses. If provided, this overrides the auto-generated palette entirely. All 10 shades are required.
| Key | Role | Typical Usage |
|---|---|---|
50 | Lightest | Subtle backgrounds, hover states |
100 | Very light | Light backgrounds |
200 | Light | Secondary backgrounds, borders |
300 | Medium-light | Inactive/disabled states |
400 | Medium | Secondary text, icons |
500 | Base (primary) | Primary buttons, links, active states |
600 | Medium-dark | Hover states on primary elements |
700 | Dark | Active/pressed states |
800 | Very dark | High-contrast text |
900 | Darkest | Maximum contrast |
How auto-generation works: When onlycoloris provided,createPalette(color)extracts the hue (H) and saturation (S) from the color, then generates shades by varying lightness from 95% (shade 50) down to 5% (shade 900). The original color is used as-is for shade 500.
Tip: When providing bothcolorandpalette, make surepalette[500]matchescolorfor consistency. If they differ,palettetakes priority for rendering whilecoloris effectively ignored.
spacing
Type: { side?: string, bottom?: string }
Default: { side: '30', bottom: '30' } (30 pixels each)
Controls the position of the widget relative to the viewport edges. The value is a numeric string representing pixels The px unit is appended automatically. Only effective in overlay mode.
spacing.sideDistance from the left or right edge (determined by thesideproperty)spacing.bottomDistance from the bottom edge
Applying custom CSS
To go beyond the built-in options, you can write CSS rules that override the widget’s default styles. Web chat elements use class names prefixed with.vfrc-.
For example, to change the background color of agent messages:
Supported CSS classes
Voiceflow provides a list of supported CSS classes that you can modify. While the widget has additional classes beyond those listed below, modifying them is at your own risk. Only the classes listed below are officially supported.| Class Name | Element |
|---|---|
vfrc-widget | Root widget container |
vfrc-chat | Chat window |
vfrc-launcher | Launcher button |
vfrc-header | Chat header |
vfrc-footer | Chat footer |
vfrc-message | Individual message |
vfrc-system-response | System/agent response |
vfrc-user-response | User message |
vfrc-chat-input | Input text area |
vfrc-button | Action button |
vfrc-card | Card component |
vfrc-carousel | Carousel container |
vfrc-image | Image component |
vfrc-avatar | Agent avatar |
vfrc-typing-indicator | Typing dots |
vfrc-proactive | Proactive message container |
vfrc-proactive__card | Individual proactive message |
vfrc-proactive__close-button | Proactive close button |
vfrc-prompt | Quick reply prompt |
vfrc-feedback | Feedback buttons |
View the full list of supported classes
View the full list of supported classes
Loading your stylesheet
Once you’ve written your CSS, you can pass it to the widget in two ways. Option 1: Link a hosted stylesheet Host your CSS file and provide the URL in theassistant.stylesheet property:
btoa() in your browser console to encode your CSS to base64.