Skip to content

Configuration

All options are passed to PeriscaleChat.init({ ... }).

js
PeriscaleChat.init({
  apiKey: "sb_live_xxx",
  position: "bottom-right",
  primaryColor: "#20808D",
  agentName: "Support",
  greeting: "Hi! How can we help?",
});

Required

OptionTypeDescription
apiKeystringYour sb_live_* business key. The widget will not render without it.

Appearance

OptionTypeDefaultDescription
positionstring"bottom-right""bottom-right" or "bottom-left".
primaryColorstring"#20808D"Brand color for the bubble and panel header.
textColorstring"#ffffff"Text color used on top of primaryColor.
bubbleSizenumber60Floating button size in pixels.
borderRadiusnumber16Panel corner radius in pixels.
fontFamilystringsystem stackOverride the panel font.

Content

OptionTypeDescription
greetingstringWelcome message shown when the panel opens.
placeholderstringMessage composer placeholder.
agentNamestringDisplay name in the panel header.
agentAvatarstringURL of the agent avatar image.

Pre-chat form

OptionTypeDescription
formTitlestringHeading shown above the pre-chat form.
nameLabelstringLabel for the name field.
emailLabelstringLabel for the email field.
phoneLabelstringLabel for the phone field.

Channels

OptionTypeDefaultDescription
chatEnabledbooleantrueHide the chat bubble entirely.
voiceCallEnabledbooleanfalseShow a voice-call button. Requires ttsUrl.
ttsUrlstringTTS service endpoint for voice calls.
whatsappEnabledbooleanfalseShow a floating WhatsApp button.
whatsappNumberstringWhatsApp number with country code, e.g. 8801712345678.

Page-aware mode

When pageAwareEnabled: true, the widget sends the page's title, headings, Open Graph metadata, and JSON-LD to the agent on each open — useful for product-detail pages where the agent should know what the visitor is looking at.

OptionTypeDefaultDescription
pageAwareEnabledbooleanfalseSend page context to the agent on open.

ES module usage

If you use a bundler:

js
import { PeriscaleChat } from "@periscale/chat-widget";

PeriscaleChat.init({ apiKey: "sb_live_xxx" });

The ES build is at https://cdn.periscale.app/chat-widget.es.js.

© Periscale