Docs · Widget

Configuration

The widget is configured entirely through data-* attributes on the <script> tag. No JavaScript API. No runtime config object. Set it once and forget it.

Required attributes

AttributeValueNotes
data-workspaceYour workspace slugPublic, read-scoped. Safe in client HTML.

Optional attributes

AttributeDefaultValuesNotes
data-themeautoauto · light · darkauto follows the customer's prefers-color-scheme.
data-positionbottom-rightbottom-right · bottom-left · top-right · top-leftWhere the bell button anchors.
data-accentworkspace settingAny CSS color (hex, oklch, rgb)Overrides the workspace accent for this embed only.
data-radiusmdsm · md · lgCorner rounding for the popover.
data-hide-bellpresence-onlyHides the floating bell. Use with a custom trigger — see below.
data-langauto-detecteden · pt-BR · es · fr · deUI strings for the bell, popover, and wall. See Localization for the fallback chain.

Full example

<script
  src="https://showkit.dev/api/widget/v1.js"
  data-workspace="acme"
  data-theme="dark"
  data-position="bottom-left"
  data-accent="#7c3aed"
  data-lang="pt-BR"
  defer
></script>

Custom trigger button

Want the bell to live inside your own header instead of floating? Add data-hide-bell to suppress the default button, then call window.ShowKit.open() from your own click handler.

<button onclick="window.ShowKit.open()">
  What's new
</button>

Localization

The widget ships five locales: en, pt-BR, es, fr, de. All five dictionaries are inline in the bundle, so locale switching is synchronous — no extra request, no flash of English content.

The active locale is resolved in this order, first match wins:

  1. data-lang on the script tag (e.g. data-lang="pt-BR") — explicit override per install.
  2. The lang attribute on your page's <html> element — most apps that ship multilingual UIs already set this, and the widget picks it up automatically.
  3. en as the final fallback.

Unsupported tags fall back by language prefix: pt-PT pt-BR, en-GB en, fr-CA fr. A locale we don't ship yet (e.g. ja) falls all the way through to en.

What's translated: the bell aria-label, popover header, subscribe form, empty / loading / error states, "Powered by ShowKit" footer, the testimonial wall's empty-state copy. Customer-authored content (changelog entries, testimonial bodies, tags) is never auto-translated — you write it in whatever language your audience reads.

Versioning

The widget is versioned at the URL. /api/widget/v1.js is the stable v1 contract — breaking changes ship as /v2/. Pin to a major version; we'll never silently change semantics under you.