Skip to Content
WidgetOverview

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

  1. Install the widget.
  2. Add your site under Domains.
  3. Confirm the documents you want visitors to see are in the Public source group.
  4. Ask a real question and check citations.

Common setups

SetupUse it for
Add an Ask Docs buttonOpen the panel from your own button, search input, or keyboard shortcut
Match your brandSet accent colors and per-slot style overrides
Choose a launcher styleUse the default pill launcher or the legacy card launcher
Choose a panel layoutPick modal, overlay, or push layout
Embed on multiple sitesUse one project across production, staging, docs, and marketing hosts
Require consent before chatShow an accept/reject screen before the first question
Translate the widgetUse built-in UI translations and your own localized copy
Identify logged-in usersAttach known user IDs and emails to sessions
Protect the widget with TurnstileRequire a Cloudflare Turnstile token on widget traffic

Prefer a dashboard flow? Use the widget builder.

Reference

ReferenceWhat it covers
AttributesEvery supported data-* script attribute and npm option
Component stylesNamed style slots, allowed CSS properties, hover/focus/active/dark variants
IconsBuilt-in icons and npm-only custom SVG
Runtime APIwindow.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