Skip to content

Bubble Attributes

All configuration for the <saytv-chat-bubble> element is done through HTML attributes. Bubble-specific attributes control the launcher appearance and panel behavior. Standard <saytv-chat> attributes are passed through to the inner widget.

Bubble-Specific Attributes

AttributeTypeDefaultDescription
position'bottom-right' | 'bottom-left''bottom-right'Which corner the bubble is anchored to.
bubble-sizenumber60Diameter of the launcher button in pixels.
bubble-colorstring'#7e171c'Background color of the launcher button. Accepts any CSS color value.
bubble-iconstringBuilt-in chat iconURL to a custom image for the launcher. The image is displayed as a 32px circle.
offset-xnumber24Horizontal distance from the viewport edge in pixels.
offset-ynumber24Vertical distance from the viewport edge in pixels.
chat-widthnumber350Width of the chat panel in pixels. Ignored on mobile (panel goes full-screen).
chat-heightnumber600Height of the chat panel in pixels. Capped at available viewport height. Ignored on mobile.
greetingstring-Text shown in a tooltip above the launcher after a delay. Leave empty to disable.
greeting-delaynumber3Seconds to wait before showing the greeting tooltip.
hide-on-mobileboolean attribute-When present, the bubble is hidden on viewports narrower than 768px.
custom-launcherstring-CSS selector for an external element to use as the launcher. Hides the built-in button.
z-indexnumber999999z-index of the bubble element.

Pass-Through Attributes

These attributes are forwarded to the inner <saytv-chat> widget. They work exactly the same as on <saytv-chat> - see the Attributes Reference for full details.

AttributeDescription
app-idApp identifier
envAPI environment ('production' or 'staging')
apiurlDirect API base URL
auth-tokenJWT access token
built-in-authShow built-in login UI
fanzoneEnable fanzone
themeColor theme ('light' or 'dark')
modeWidget mode (e.g. 'page-chat')
page-idPage chat identifier
page-namePage chat display name
custom-tab-urlCustom tab iframe URL
custom-tab-labelCustom tab label
custom-tab-iconCustom tab icon

Positioning

The bubble is anchored to a corner of the viewport using position combined with offset-x and offset-y.

Bottom-right (default)

html
<saytv-chat-bubble
  app-id="your-app-id"
  position="bottom-right"
  offset-x="24"
  offset-y="24"
></saytv-chat-bubble>

Bottom-left

html
<saytv-chat-bubble
  app-id="your-app-id"
  position="bottom-left"
  offset-x="24"
  offset-y="24"
></saytv-chat-bubble>

Avoid overlapping other elements

If your site has a cookie banner or bottom navigation, increase the vertical offset:

html
<saytv-chat-bubble
  app-id="your-app-id"
  offset-y="80"
></saytv-chat-bubble>

Panel Sizing

The chat panel opens above the launcher. Its dimensions are controlled by chat-width and chat-height.

html
<saytv-chat-bubble
  app-id="your-app-id"
  chat-width="400"
  chat-height="700"
></saytv-chat-bubble>

The panel height is automatically capped so it doesn't overflow the viewport. On mobile (below 768px), the panel goes full-screen regardless of these values.

Greeting Tooltip

Show a message above the launcher to prompt users to engage:

html
<saytv-chat-bubble
  app-id="your-app-id"
  greeting="Have a question? Chat with us!"
  greeting-delay="5"
></saytv-chat-bubble>

The tooltip appears after greeting-delay seconds and includes a close button. It is automatically dismissed when the user opens the chat panel. If no greeting attribute is set, no tooltip is shown.

Changing the greeting attribute to a new value resets the dismissed state, so the updated greeting will appear again after the delay.

Reactive Updates

All observed attributes are reactive. Changing an attribute at runtime updates the bubble immediately:

js
const bubble = document.querySelector('saytv-chat-bubble');

// Move to the other corner
bubble.setAttribute('position', 'bottom-left');

// Change the color
bubble.setAttribute('bubble-color', '#0066cc');

// Update greeting text
bubble.setAttribute('greeting', 'New deals available!');

Widget pass-through attributes are also reactive. Changing theme or auth-token on the bubble element updates the inner widget:

js
bubble.setAttribute('theme', 'dark');
bubble.setAttribute('auth-token', newToken);

SayTV Chat SDK Documentation