Skip to main content

Overview

The AI Chat Extension SDK provides extensive customization options to ensure the chat experience seamlessly matches your extension’s brand identity. You can customize logos, colors, fonts, layout, and content for both the chat badge and chat panel.

Branding configuration

Both the chat badge and chat panel support brand customization through the brand property:

Chat panel branding

Chat badge branding

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

Styling configuration

Both the chat badge and chat panel support color and font customization through the styling property:

Color customization

Color mode options:
  • 'light': Always use light mode colors
  • 'dark': Always use dark mode colors
  • 'system': Respect the user’s system preference (default)

Brand-specific examples

Font customization

Layout configuration

Control the position and size of the chat panel and badge using the layout property:
Use chatConfig.isFloating (defaults to true) to control whether floating panel styles (border, border-radius, box shadow) are applied to the chat panel.

Chat panel layout

Badge layout

Content customization

Chat header

Customize the logo and name displayed in the chat panel header:
Header logo requirements:
  • Format: PNG, SVG, or JPG
  • Height: Logo will be scaled to height of 36px while preserving aspect ratio
  • Width: Flexible - works with both square and wide logos
If content.header values are not provided, they will fall back to the brand configuration:
  • header.logoUrl falls back to brand.logoUrl
  • header.name falls back to brand.name
This allows you to set branding once in brand and have it automatically apply to the header, or override specific header values when needed.

Chat panel content

Customize text and messages displayed in the chat panel:

Badge content

Customize text displayed on the chat badge:

Assistant configuration

Customize the AI assistant’s identity:
The same configuration is available for badgeConfig.assistant.

Badge behavior

Control how the chat badge behaves:
Behavior options:
  • allowExpand: true: Badge expands to show suggested prompts on hover
  • allowExpand: false: Badge stays collapsed, only showing the icon
  • autoCollapse: true: Badge collapses after a few seconds
  • autoCollapse: false: Badge stays expanded with prompts visible

Complete customization example

Here’s a fully customized configuration:

Preview your customization

To see your customization in action:
1

Test on Google Search

Navigate to Google Search and search for “best headphones” or another shopping query
2

Verify badge appearance

Check that the chat badge appears with your custom logo and styling
3

Open chat panel

Click the badge or a suggested prompt to open the chat panel
4

Verify panel styling

Confirm your custom colors, layout, and branding appear correctly in the panel

Best practices

Use the same colors, logos, and styling as your main extension UI to create a cohesive experience.
Use colorMode: 'system' and provide both primaryColor and primaryColorDarkMode to ensure your UI looks good in both light and dark modes.
  • Use SVG for scalable logos
  • Optimize PNG files to <100KB
  • Serve logos from a CDN for fast loading
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 your layout on different screen sizes to ensure the panel doesn’t obscure critical page content.

Troubleshooting

Causes:
  • Invalid logo URL
  • CORS restrictions on logo image
  • Logo URL not accessible
Solutions:
  • Verify logo URL is accessible in a browser
  • Host logo on a CDN with CORS enabled
  • Use HTTPS for logo URLs
Causes:
  • Invalid color format
  • Wrong colorMode setting
Solutions:
  • Use valid CSS color values (hex, rgb, hsl)
  • Check colorMode matches your testing environment
  • Provide both light and dark mode colors
Causes:
  • Conflicting position values
  • Invalid CSS units
Solutions:
  • Use valid CSS units (px, vh, vw, %)
  • Test with specific position values before using ‘unset’
  • Check for conflicting left/right or top/bottom values