Skip to main content

Overview

The AI Chat SDK provides customization options to ensure the chat experience seamlessly matches your application’s brand identity. You can customize branding, colors, fonts, and layout.

Brand configuration

Configure your brand identity using the brand option available in chatConfig, badgeConfig, and inlineConfig.

Brand options

Logo requirements:
  • Format: PNG, SVG, or JPG
  • Size: 200x200px minimum (square aspect ratio recommended)
  • Background: Transparent PNG recommended
  • File size: <100KB for best performance

Using a custom logo component

For React applications, you can pass a custom logo component:

Color customization

Configure colors using the styling option available in chatConfig, badgeConfig, and inlineConfig.

Styling options

Color mode

Control how the SDK handles light and dark themes:
  • 'system' (default): Automatically matches the user’s system preference
  • 'light': Always use light mode colors
  • 'dark': Always use dark mode colors

Brand color examples

Ensure your custom font is loaded on the page before initializing the SDK.

Assistant configuration

Configure the AI assistant’s identity using the assistant option.

Assistant options

Layout customization

Position and size

Control where the chat panel appears on the page:

Common layout patterns

Visual styling

Customize the panel’s visual appearance:

Layout options

Content customization

Customize text content displayed throughout the chat interface. Customize the chat header with your logo and brand name:
You can use either logo (React component) or logoUrl (image URL). If neither is provided, the SDK will fall back to the corresponding brand config values.

Default prompts

Provide suggested prompts for users:

Input placeholder

Customize the input field placeholder:

Intro screen

Customize the intro message shown when chat opens:

Loading messages

Customize loading messages that cycle while waiting for responses:

Error messages

Customize error message text:

Disclaimer text

Customize the disclaimer text:

Badge customization

Customize the floating badge entry point:

Inline input customization

Customize the inline input entry point:

Complete customization example

Here’s a fully customized configuration:

Best practices

Use the same colors, logos, and fonts as your main application UI to create a cohesive experience.
If using colorMode: 'system', test your customization in both light and dark modes:
  • Use SVG for scalable logos
  • Optimize PNG files to <100KB
  • Serve logos from a CDN for fast loading
  • Use transparent backgrounds
Ensure sufficient contrast for readability:
  • Text on backgrounds: 4.5:1 contrast ratio minimum
  • Interactive elements: 3:1 contrast ratio minimum
Use tools like WebAIM Contrast Checker to verify.
Test the chat panel on different screen sizes to ensure it doesn’t obscure critical page content.
For mobile, consider adjusting the layout:

Troubleshooting

Causes:
  • Invalid logo URL
  • CORS restrictions on logo image
  • Logo URL not accessible
Solutions:
  • Verify logo URL is accessible in browser
  • Host logo on a CDN with CORS enabled
  • Check browser DevTools for network errors
Causes:
  • Browser color profile differences
  • System color mode affecting display
  • Transparency effects
Solutions:
  • Test on multiple browsers
  • Use specific hex color values
  • Check colorMode setting
Causes:
  • Font not loaded before SDK initialization
  • Incorrect font family syntax
Solutions:
  • Ensure font is loaded (use document.fonts.ready)
  • Include fallback fonts in the font family string
  • Verify font name matches the loaded font
Causes:
  • Incorrect positioning
  • Size too large for viewport
Solutions:
  • Adjust position and size values
  • Use responsive sizing based on viewport
  • Test on different screen sizes