Overview
The Weav Chatbot Widget is a lightweight, embeddable chat interface that lets you add AI-powered customer support to any website. It renders a customizable launcher button that opens a chat interface in an iframe, and it can be controlled through a simple JavaScript API.The configuration options below are to provide developers with more flexibility of the Weav chatbot experience. Most of these features can be controlled within the Weav application for non developers.
Features
- Fully customizable appearance, including colors, icons, text, position, and theme
- Mobile responsive with optimized layouts
- Accessible, including ARIA labels and keyboard support with the
Esckey - Lightweight with minimal performance impact
- Secure iframe isolation
- JavaScript API for initialization, teardown, and event handling
Installation
Basic usage
- Include the widget script near the end of your
<body>tag. - Call
window.WeavWidget.init()once the script has loaded.
Quick start example
JavaScript API
Once loaded, the script registers a single global object:window.WeavWidget.
Configuration options
Pass configuration through the object supplied toinit().
agentSlug is required. All other properties are optional.
Top-level options
Branding options
Use thebranding object to customize the launcher button.
Widget options
Use thewidget object to customize behavior and appearance.
Widget modes
Button icons
Button positions
Examples
Minimal configuration
Custom branding
Custom icon using an image URL
Left-aligned launcher button
Dark mode widget
Custom widget messages
High z-index for complex sites
Programmatic control
- Use
window.WeavWidget.open()to open the widget without user interaction - Use
window.WeavWidget.close()to close it programmatically - Use
window.WeavWidget.destroy()to remove the widget entirely - Use
window.WeavWidget.init(newOptions)at any time to re-initialize the widget with updated configuration\
open() and close() calls made immediately after init() run as soon as the React tree is ready, so you do not need to wait for a callback.
Events
Useon() and off() to react to widget lifecycle events.
Custom mount point
ProvidemountElement if you want to render the widget inside your own container.
destroy() leaves the element in place so you can reuse it for future mounts.
Triggering the widget from custom elements
You can open the widget and optionally send a pre-filled message from any element on your page. This is useful when you want buttons, links, or other UI elements to start a specific conversation.Open and send a message by element ID
Open and send a message by class name
Multiple trigger buttons
You can attach different messages to different elements.Advanced usage
Programmatic control only
The launcher button is visible by default. To hide it and control the widget entirely through JavaScript, setlauncherHidden: true and use open() and close().
launcherHidden is true, the launcher button is completely hidden and the widget can only be opened with window.WeavWidget.open().
This is useful when you want to integrate the widget into your own custom UI.

