Widget Integration

Embed the NeNe Corpus chat widget on any existing website with a single <script> tag.

Quick embed

<script
  src="https://your-domain.com/widget.js"
  data-corpus-url="https://your-domain.com"
  defer
></script>

Place this snippet just before the closing </body> tag of your page.

Attributes

AttributeRequiredDescription
src Full URL to widget.js on your NeNe Corpus server
data-corpus-url Base URL of your NeNe Corpus installation
data-locale Override display locale: ja, en, de, fr, zh-Hans, pt-BR

Same-origin requirement

The widget must be loaded from the same origin as your NeNe Corpus installation. Cross-origin embedding is not supported by design (security).

<!-- ✅ correct: widget.js served from your own NeNe Corpus instance -->
<script src="https://corpus.example.com/widget.js"
        data-corpus-url="https://corpus.example.com" defer></script>

<!-- ❌ wrong: widget.js from a different origin -->
<script src="https://cdn.example.com/widget.js" ...></script>

Appearance customization

Customize colors, hero text, avatars, and layout from the Admin UI under Settings → Design. Changes take effect immediately without re-deploying.

Available settings

  • Themelight / dark / auto
  • Primary color — brand hex color
  • Hero title & subtitle — welcome message shown before first message
  • Bot avatar — upload a custom image
  • User avatar modeinitial (letter) or icon
  • Custom CSS — inject additional styles (sanitized server-side)
  • Widget layout — position (bottom-right / bottom-left), max width

Locales

The widget ships with 6 built-in locales: ja, en, de, fr, zh-Hans, pt-BR.

Locale resolution order:

  1. data-locale attribute on the script tag
  2. Browser Accept-Language header
  3. Fallback: en