Widget
The Knoku widget is an embeddable chat panel for websites and web apps. It runs in a Shadow DOM, follows the host site’s theme, and answers from the project’s Public source group.
Use this section for installation, common setup patterns, and the full technical reference.
Start here
- Install the widget.
- Add your site under Domains.
- Confirm the documents you want visitors to see are in the Public source group.
- Ask a real question and check citations.
Common setups
| Setup | Use it for |
|---|---|
| Add an Ask Docs button | Open the panel from your own button, search input, or keyboard shortcut |
| Match your brand | Set accent colors and per-slot style overrides |
| Choose a launcher style | Use the default pill launcher or the legacy card launcher |
| Choose a panel layout | Pick modal, overlay, or push layout |
| Embed on multiple sites | Use one project across production, staging, docs, and marketing hosts |
| Require consent before chat | Show an accept/reject screen before the first question |
| Translate the widget | Use built-in UI translations and your own localized copy |
| Identify logged-in users | Attach known user IDs and emails to sessions |
| Protect the widget with Turnstile | Require a Cloudflare Turnstile token on widget traffic |
Prefer a dashboard flow? Use the widget builder.
Reference
| Reference | What it covers |
|---|---|
| Attributes | Every supported data-* script attribute and npm option |
| Component styles | Named style slots, allowed CSS properties, hover/focus/active/dark variants |
| Icons | Built-in icons and npm-only custom SVG |
| Runtime API | window.Knoku, custom events, response events, teardown |
Framework guides
Use Doc platforms for placement in Docusaurus, VitePress, MkDocs, Nextra, Mintlify, Sphinx, Read the Docs, or a custom website.
Last updated on