You can try the widget live on getanteon.com to see how it works in a real-world setting.
Prerequisites
Before adding the widget, make sure you have:- A Guru on Gurubase (either on Gurubase.io or self-hosted with Enterprise plan)
- A Widget ID from your Guru’s settings
Getting Your Widget ID
- Click “My Gurus” under the profile
- Click the Guru you want to add the widget to
- Click “Integrations” and then “Web Widget”
- Click “New Widget ID”
- Enter your website’s domain
- Copy the generated Widget ID

- If a Widget ID created for
https://www.example.com
will only work on that exact domain.- It won’t work on subdomains like
https://docs.example.com
- It won’t work on different domains like
https://example.org
- It won’t work on subdomains like
- For local development, you need to create a separate Widget ID using your development URL (e.g.,
http://localhost:3000
) - Domain input supports wildcard (
*
) expression:*.example.com
will match any subdomain ofexample.com
http://localhost:*
will match any port oflocalhost
*
will match any domain, so be careful with this option! Anyone who knows your Widget ID can send requests to your Guru.
Basic Installation
Add this script to your website’s HTML:Configuration Options
Option | Description | Default |
---|---|---|
data-widget-id | Your widget ID (required) | - |
data-text | Button text | ”Ask AI” |
data-margins | Button positioning | {"bottom": "1rem", "right": "1rem"} |
data-light-mode | Light mode toggle. Possible values are "light" , "dark" , "auto" . Auto mode syncs the widget theme with the website’s theme | "dark" |
data-bg-color | Primary color | Fetched from Gurubase |
data-icon-url | Custom logo URL | Fetched from Gurubase |
data-name | Custom name | Fetched from Gurubase |
data-baseUrl | URL to your Gurubase backend. Only for self-hosted Gurubase (Enterprise plan). | Gurubase Cloud |
data-tooltip | Tooltip text | null |
data-tooltip-side | "top" , "bottom" , "left" , "right" , "top left" , "top right" , "bottom left" , "bottom right" | "left" |
data-overlap-content | Whether to overlap the main content or shrink its width with the sidebar | "false" |
Self-hosted Installation (Enterprise Only)
Self-hosted installations are exclusively available under the Enterprise plan. To request access, contact us at [email protected].If you’re using self-hosted Gurubase, you must set the Gurubase instance URL using the
data-baseUrl
attribute. The default URL of Self-hosted Gurubase instance is http://localhost:8029/api/
.Customization Examples
Custom Button Text and Position
Light Mode with Custom Colors
Exposed Functions
-
switchTheme(lightMode = null)
You can use this function to sync the theme of the widget with the theme of your website. It accepts an optionallightMode
boolean parameter to force the widget to be in light/dark mode. 3 possible usages of this function:switchTheme()
: Toggle the themeswitchTheme(true)
: Force light modeswitchTheme(false)
: Force dark mode
window.chatWidget.switchTheme();
An example usage is shown in the MKDocs example in thetheme-switch.js
script. It toggles the theme of the widget based on the MkDocs website by listening for changes in the theme and using this function with each change.
Platform-Specific Integrations
Archbee
To add the Gurubase widget to your Archbee documentation:- Go to Space Settings > Custom Code
- Under the “Include Headers” text area, paste the Gurubase widget script that you received from the Gurubase platform:
For security reasons, scripts are only included on a custom domain in Archbee. Make sure you have set up a custom domain for your documentation to use the widget.

GitBook
GitBook offers an official integration that makes it easy to add Gurubase to your documentation:- In your GitBook space, go to Integrations and search for Gurubase
- Click Install to add the integration
- Click Install on a docs site and select a site to install
- Enter your Widget ID from Gurubase platform
- Configure additional options (optional)
