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 thebrand property:
Chat panel branding
Chat badge branding
- 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 thestyling property:
Color customization
'light': Always use light mode colors'dark': Always use dark mode colors'system': Respect the user’s system preference (default)
Brand-specific examples
- Blue theme
- Purple theme
- Green theme
- Orange theme
Font customization
Layout configuration
Control the position and size of the chat panel and badge using thelayout 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:- 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.logoUrlfalls back tobrand.logoUrlheader.namefalls back tobrand.name
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:badgeConfig.assistant.
Badge behavior
Control how the chat badge behaves:allowExpand: true: Badge expands to show suggested prompts on hoverallowExpand: false: Badge stays collapsed, only showing the iconautoCollapse: true: Badge collapses after a few secondsautoCollapse: 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:Test on Google Search
Navigate to Google Search and search for “best headphones” or another shopping query
Best practices
1. Maintain brand consistency
1. Maintain brand consistency
Use the same colors, logos, and styling as your main extension UI to create a cohesive experience.
2. Test on light and dark pages
2. Test on light and dark pages
Use
colorMode: 'system' and provide both primaryColor and primaryColorDarkMode to ensure your UI looks good in both light and dark modes.3. Keep logos optimized
3. Keep logos optimized
- Use SVG for scalable logos
- Optimize PNG files to <100KB
- Serve logos from a CDN for fast loading
4. Use accessible colors
4. Use accessible colors
Ensure sufficient contrast for readability:
- Text on backgrounds: 4.5:1 contrast ratio minimum
- Interactive elements: 3:1 contrast ratio minimum
5. Test panel layout
5. Test panel layout
Test your layout on different screen sizes to ensure the panel doesn’t obscure critical page content.
Troubleshooting
Logo not appearing
Logo not appearing
Causes:
- Invalid logo URL
- CORS restrictions on logo image
- Logo URL not accessible
- Verify logo URL is accessible in a browser
- Host logo on a CDN with CORS enabled
- Use HTTPS for logo URLs
Colors not applying
Colors not applying
Causes:
- Invalid color format
- Wrong colorMode setting
- Use valid CSS color values (hex, rgb, hsl)
- Check colorMode matches your testing environment
- Provide both light and dark mode colors
Layout issues
Layout issues
Causes:
- Conflicting position values
- Invalid CSS units
- Use valid CSS units (px, vh, vw, %)
- Test with specific position values before using ‘unset’
- Check for conflicting left/right or top/bottom values

