skip to main content
Browse documentation

Widget configuration

Configure the widget with data-* attributes on the script tag.

You configure the widget with data-* attributes on the script tag. Here’s the full set.

Core attributes

  • data-key β€” your publishable key (pk_test_… or pk_live_…). Required.
  • data-position β€” launcher corner: bottom-right (default), bottom-left, top-right, or top-left.
  • data-locale β€” a language hint (for example ar or en-US); the highest-priority language input.
  • data-chat-size β€” small (default), medium, large, fullscreen, or embedded.
  • data-chat-mode β€” normal (default) or split (a two-pane layout).
  • data-env β€” development or production (otherwise inferred from the key prefix).
  • data-theme β€” a JSON string of theme token overrides.

Advanced attributes

  • data-origin β€” the Syncanix API origin (defaults to the production API).
  • data-mount-target β€” a CSS selector for where to mount an embedded widget.
  • data-config-load β€” lazy (fetch settings on first open, default) or eager (at mount).
  • data-executor β€” the name of a global function that runs browser/host actions.
  • data-token-provider β€” the name of a global function returning the end user’s token.
  • data-step-up-provider β€” the name of a global function that triggers step-up re-authentication.
  • data-client-witness β€” opt in to passive, shape-only API-traffic observation (off by default).
  • data-act-on-behalf-consent β€” require a one-time 'act on your behalf' consent (off by default).

Next steps