Made in 10Docs
GuidesAPI
Website widget

Attributes

The tag's data attributes: corner, launcher, theme, colours, language, teaser and panel, for one site without changing the deployment.

Everything but data-key is optional. An attribute wins over the deployment's appearance, so use attributes for what one site needs and the appearance for what every site shares. TalkWidget('update', …) wins over both, for one page.

index.html
<script
  async
  src="https://talk.madein10.com/widget.js"
  data-key="pk_live_…"
  data-position="bottom-left"
  data-launcher="face_label"
  data-label="Talk to Sophie"
  data-theme="auto"
  data-teaser-delay="8"
></script>

All attributes

AttributeValuesWhat it sets
data-keypk_live_… or pk_test_…The deployment. Required
data-positionbottom-right (default), bottom-leftThe corner
data-offset-x, data-offset-y0 to 160 (px)Distance from the window's edges (default 20)
data-launcherface, face_label, card, pill, icon, tab, or noneThe launcher's style; none shows no launcher at all (below)
data-combineintercom, crisp, zendesk, tawk, livechat, hubspot, tidio, drift, customOne launcher for your site's chat and ours (below)
data-mobile-launcherthe sameIts style on phones (default: the same, but a card shows as a face)
data-labeltextThe launcher's label (shown by face_label, pill and tab)
data-themelight, dark, autoauto follows the visitor's system setting
data-accent, data-on-accent, data-ink, data-paper#rrggbbColours of the theme in use (the dark one with data-theme="dark")
data-languageen, fa, de…The widget's language; else the page's <html lang>, else the browser's
data-teasertext, or offOne teaser message for every language, or no teaser
data-teaser-delay0 to 120 (s)When the teaser pops up after the page loads
data-teaser-frequencyevery_visit, once_per_session, once_per_dayHow often it pops up
data-title, data-subtitletextThe panel's header
data-opentrue, 1 or yesOpen the panel when the page loads
data-charactera character's id (chr_…)On this page, start with this one of the deployment's characters (one it offers; else its own)

Colours

The four colours are the widget's whole palette: accent (the launcher's ring, buttons, the AI badge), on-accent (text on the accent), ink (text) and paper (backgrounds). Each is a #rrggbb hex colour. On the tag they apply to the theme in use; to set both a light and a dark palette, use the deployment's appearance (colors and dark_colors).

Language

The widget's language is data-language, else your page's <html lang>, else the visitor's browser's. It picks your texts in that language, else our own words in it, else your English ones. Persian, Arabic, Hebrew and Urdu turn the widget right to left. The visitor still picks the call's language in the panel.

Opening it from your own button

data-open="true" (or "1", or "yes", in lower case) opens the panel as the page loads; the call starts from the visitor's click inside it. To open it from a button of yours, use the JavaScript API: TalkWidget('open'), or TalkWidget('start', { … }) to start the call at once.

No launcher of ours

data-launcher="none" shows no launcher and no teaser of ours. Open the panel from your own button, anywhere on the page or inside your own chat, with the JavaScript API:

index.html
<script>window.TalkWidget=window.TalkWidget||function(){(TalkWidget.q=TalkWidget.q||[]).push(arguments)}</script>
<script async src="https://talk.madein10.com/widget.js" data-key="pk_live_…" data-launcher="none"></script>
<button type="button" onclick="TalkWidget('open')">Talk face to face</button>

The panel opens from the corner data-position names, and as a full-screen sheet on a phone, as it always does. The deployment's appearance can set the same with launcher.mode: "none".

One launcher with your chat

If your site already has a chat bubble, ours can be the only launcher: a click offers Chat (your chat) or Talk face to face (our call), in the widget's language. Name your chat with data-combine:

index.html
<script async src="https://talk.madein10.com/widget.js" data-key="pk_live_…" data-combine="intercom"></script>
  • Your chat's own snippet stays as it is. Its launcher is hidden through its own JavaScript API, and its chat opens when the visitor picks Chat. Ours steps aside while your chat is open and comes back when it closes.
  • If your chat hasn't loaded within 15 seconds (blocked, or set up wrongly), our launcher simply opens the call.
  • The teaser offers both.
  • The deployment's appearance can set the same with launcher.mode: "combined" and launcher.combine.provider, and the chooser's words with label_chat and label_talk.

Any other chat, or your own: data-combine="custom", and tell the widget your chat's functions before the tag:

index.html
<script>
  window.TalkWidget=window.TalkWidget||function(){(TalkWidget.q=TalkWidget.q||[]).push(arguments)};
  TalkWidget('combine', {
    label: 'Chat',                                         // the chooser's first option (default: ours, in the page's language)
    open: function () { myChat.open(); },                  // open your chat
    hide: function () { myChat.hideLauncher(); },          // hide your chat's own launcher (optional)
    onClose: function (done) { myChat.on('close', done); } // call done() when your chat closes (optional)
  });
</script>
<script async src="https://talk.madein10.com/widget.js" data-key="pk_live_…" data-combine="custom"></script>

Without onClose, our launcher stays where it is while your chat is open.

On this page