Skip to content

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 is available on all plans. However, the AI-powered responses behind it are plan-gated. Free plan sites show the widget but may have limited AI query capacity. Check your plan's usage limits for details.

Configuration

Configure the widget in Settings > Branding under the Embed Widget section:

Setting

Description

Default

Welcome message

Greeting shown when the widget opens

"How can I help?"

Suggested questions

Pre-filled question buttons shown on open

None

Position

Widget placement on the page

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:

  1. Receives the reader's question

  2. Searches the published site content

  3. Generates an answer with relevant citations

  4. 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://your-site.topicary.com/chat.js"
  data-site-id="YOUR_SITE_ID"
  data-theme="auto"
  async>
</script>

Replace your-site.topicary.com with your published site's domain and YOUR_SITE_ID with the site ID from your publication target settings.

Technical details

  • Built as a self-contained vanilla JavaScript widget (chat.js)

  • Uses Shadow DOM for style encapsulation — no conflicts with the host site's CSS

  • Communicates via server-sent events (SSE) for streaming responses

  • No framework dependencies

Add 3-5 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.

Availability

The embed widget is available on all plans. The AI-powered search behind it is plan-gated — check current plan limits for details.


See also

Was this page helpful?