Embed widget
The embed widget is a floating AI chat that readers can use to ask questions about your documentation. It appears as a small button in the bottom-right corner of published sites.
The embed widget and the reader AI that powers it are available on every plan, including the free tier. Plans differ only in AI query capacity, not capability. Check your plan's usage limits for details.
Configuration
Configure the widget in Settings > General, in the Embed Widget part of the Branding section:
Setting | Description | Default |
|---|---|---|
Welcome message | Greeting shown when the widget opens (up to 200 characters) | "Ask a question about this documentation" |
Suggested questions | Up to 3 pre-filled question buttons (each up to 100 characters) | None |
Position | Bottom-right or bottom-left | Bottom-right |
Theme | Color scheme: auto, light, or dark | Auto |
How it works
The widget uses AI (Gemini 3.5 Flash) to answer reader questions based on the published content. It:
Receives the reader's question
Searches the published site content
Generates an answer with relevant citations
Streams the response in real-time
Embed snippet
You can also embed the widget on external pages outside of your published Topicary site. Add the following script tag before the closing </body> tag:
<script
src="https://app.topicary.com/embed/chat.js"
data-target-id="YOUR_TARGET_ID">
</script>Replace YOUR_TARGET_ID with the publication target's ID. The widget reads the target ID from the data-target-id attribute and calls back to the same host the script was loaded from.
Embedding on your own published site works automatically. To embed on a different domain, that domain must be on the target's allowed-origins list. This allowlist is not yet configurable from the dashboard; contact support to add an external origin.
Technical details
Built as a self-contained vanilla JavaScript widget (
chat.js)Uses Shadow DOM (a browser feature that isolates widget styles from the host page) for style encapsulation, with no conflicts with the host site's CSS
Communicates through server-sent events (SSE) for streaming responses
No framework dependencies
Add up to 3 suggested questions that reflect common reader tasks. Well-chosen suggestions help readers discover the widget's capabilities and reduce the friction of typing a first question.
Framework-specific embed packages
For teams that want tighter integration than the script tag embed, Topicary provides framework-specific packages:
@topicary/embed-react
React 18+ components for embedding Topicary features directly in a React application:
TopicaryChat: floating iframe chat widgetTopicarySearch: inline streaming searchTopicaryDocs: full documentation site iframe
@topicary/embed-web
Custom elements using Shadow DOM for framework-agnostic integration:
<topicary-chat>: chat widget<topicary-search>: inline search<topicary-docs>: full documentation site
@topicary/embed-node
Node.js client for server-side access to published site content:
TopicaryClientwithsearch(),getPages(),getPage(), andchat()(async generator) methods
Availability
The embed widget and the reader AI behind it are available on every plan, including the free tier. Plans differ only in AI query capacity. Check current plan limits for details.
See also
AI-ready published sites: all machine-readable endpoints including the Ask endpoint that powers the widget
Published site features: full list of reader-facing features on published sites including AI search
Plans and limits: reader AI is available on every plan; check your plan's query capacity
Customize your site's branding: configure the widget's theme and position alongside other branding settings