Embedding the Widget
Add intelligent chat capabilities to your application with the Char AI widget.Quick Start
1
Add the Script
Include the Char AI script in your HTML:
2
Add a Container
Create a container element where the widget will render:
3
Initialize
Initialize the widget with your API key:
Installation Methods
- Script Tag
- npm
- React
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your site API key |
containerId | string | 'char-widget' | Target element ID |
theme | 'light' | 'dark' | 'auto' | 'auto' | Color theme |
position | 'bottom-right' | 'bottom-left' | 'bottom-right' | Floating position |
user | object | null | User identification |
Positioning
Embedded
Render inside a container element. Good for dedicated chat pages.
Floating
Floating button that expands to chat. Good for support widgets.

