Messenger options
Presentation options accepted by mountWidget.
CustomerAgentWidgetOptions configures the built-in Messenger. Identity, context, language, and
page metadata are client options. The required client supplies them;
no repeated appId is needed when mounting UI.
Fields
| Option | Type | Required | Effect |
|---|---|---|---|
client | CustomerAgentClient | Yes | Client whose messages and actions the Messenger uses. |
brand.name | string | No | Overrides the Messenger brand display name. |
header.close | boolean | No | Shows the panel close action unless false. |
header.menu | boolean | No | Shows the more-options menu unless false. |
launcher.target | HTMLElement | string | No | Uses a host element as the launcher; a selector miss falls back to the built-in launcher. |
launcher.placement | "top" | "right" | "bottom" | "left" | No | Preferred desktop panel side around its launcher anchor. |
launcher.offset | number | No | Panel offset in pixels; negative values are clamped to zero. |
launcher.style | Record<string, number | string | undefined> | No | Inline styles on the built-in launcher host; color also reaches its button. |
launcher.variables | WidgetLauncherVariables | No | Built-in button variables resolved from the host document before use inside the iframe. |
messages | WidgetLocaleMessages | No | Partial UI translation overrides. |
mobile.mode | "fullscreen" | "bottom-sheet" | No | Mobile presentation; defaults to fullscreen. |
mount | HTMLElement | string | No | Embeds UI in a host; defaults to document.body, including selector misses. |
openOnInit | boolean | No | Opens during mount; defaults to false and does not emit widget.opened. |
position | "bottom-right" | "bottom-left" | No | Default screen corner; defaults to bottom-right. |
theme.primaryColor | string | No | Primary UI color. |
theme.actionCard | Partial<Record<"background" | "borderColor" | "borderRadius" | "padding" | "titleColor" | "textColor" | "primaryColor" | "primaryTextColor", string>> | No | Overrides card appearance inside the Messenger iframe. |
Unset brand.name, theme.primaryColor, and messages.welcome_message use the client's
publicConfig brand name, primary color, and welcome message for the
current locale, and follow its updates.
A resolved custom target suppresses the built-in launcher and toggles the panel on click, Enter,
and Space. Host attributes are restored when that target is replaced or the widget unmounts.
widget.getState().launcher.anchor exposes the actual custom target or built-in host for positioning
host-owned UI. Position and placement are preferences subject to available viewport space.
Action Card Theme
Card theme fields accept CSS values and update through widget.update({ theme: { actionCard } }).
Omitted fields use the existing Messenger tokens: white surface, subtle border, 16px radius, 16px
padding and the Messenger primary action color. Overrides affect cards in both conversation types.
Host-page selectors do not cross the iframe boundary; pass values through theme.actionCard.
The fields map to --customer-agent-card-background, --customer-agent-card-border-color,
--customer-agent-card-border-radius, --customer-agent-card-padding,
--customer-agent-card-title-color, --customer-agent-card-text-color,
--customer-agent-card-primary-color, and --customer-agent-card-primary-text-color respectively.
Launcher Variables
WidgetLauncherVariables is a partial record of these names, each accepting a number, CSS string,
or undefined:
| Normal | Hover |
|---|---|
bg-color | hover-bg-color |
color | hover-color |
border-color | hover-border-color |
border-radius | hover-border-radius |
border-style | hover-border-style |
border-width | hover-border-width |
box-shadow | hover-box-shadow |
These styles and variables customize the built-in launcher, not a host's custom target element.
Client replacement and mount changes require a new mounting call. widget.update(...) accepts
presentation changes; constructor-only fields are described in Messenger methods.