Skip to content

Chat Widget

Chat shows your combined Twitch, YouTube, TikTok and Kick chat in OBS and other tools that support browser sources. Use it when you want one chat overlay for every connected platform.

Chat widget editor
  1. Open the Synchra Dashboard.
  2. Go to Widgets.
  3. Create a Chat widget.
  4. Choose the platforms, message types, notices and display settings you want.
  5. Click Widget URL and copy the URL.
  6. Add it to OBS as a Browser Source.

You can customize platform icons, badges, timestamps, usernames, message text, emotes, notices, themes, colors, background, border, spacing and size settings.

Chat can be styled using custom CSS. Start with the built-in settings first. Use custom CSS when you need a specific chat bubble layout, badge treatment, message width, notice filter or theme detail.

CSS order: built-in CSS, Theme CSS, then Widget CSS. Later rules win at equal specificity.

Simplified generated markup for a chat message:

<div
  class="chat-container chat-size-md"
  data-message-order="bottom"
  data-message-alignment="left"
>
  <div class="chat-messages-container">
    <div
      class="chat-widget-message chat-widget-message--message"
      data-chat-message-type="message"
      data-chat-sub-type="first_message"
      data-chat-provider="twitch"
    >
      <div class="chat-message-container" data-badges="subscriber moderator">
        <span class="chat-message-meta-container">
          <span class="chat-message-icons-container">
            <span class="chat-message-provider-logo" data-provider="twitch">
              <span class="chat-message-provider-logo-icon">...</span>
            </span>
            <span class="chat-message-badges-container">
              <img class="chat-message-badge" alt="" />
            </span>
          </span>
          <span>
            <span class="chat-message-username">Viewer name</span>
            <span class="chat-message-username-separator">:</span>
          </span>
        </span>
        <span class="chat-message-text">
          Message text, <span class="chat-message-mention">@mention</span>,
          <a class="chat-message-link">link</a> or
          <img class="chat-message-emote" alt="emote" />
        </span>
      </div>
    </div>
    <!-- More .chat-widget-message elements -->
  </div>
</div>

When Badge is selected for Platform logo display, the provider span additionally receives the chat-message-provider-logo-badge class and the provider-registry color variable:

<span
  class="chat-message-provider-logo chat-message-provider-logo-badge"
  data-provider="twitch"
  style="--chat-provider-logo-badge-color: #9146ff"
>
  ...
</span>

A notice uses this content inside the same outer item wrapper:

<div
  class="chat-widget-message chat-widget-message--notice chat-widget-message--subtype-sub"
  data-chat-message-type="notice"
  data-chat-sub-type="sub"
  data-chat-provider="twitch"
>
  <div class="chat-message-container chat-widget-notice-line">
    <span class="chat-widget-notice-header">
      <span class="chat-widget-notice-type">Subscription</span>
      <span class="chat-widget-notice-user">Viewer name</span>
      <span class="chat-message-text chat-widget-notice-text">subscribed</span>
    </span>
    <span class="chat-widget-notice-body">
      <!-- Optional -->
      <span class="chat-message-text chat-widget-notice-message"
        >User message</span
      >
    </span>
  </div>
</div>
ClassDescription
.chat-containerFull-height root. It owns the widget variables and a size class such as .chat-size-md.
.chat-messages-containerContainer for rendered chat items.
.chat-widget-messageWrapper for a rendered message or notice.
.chat-widget-message--messageAdded to a normal chat message item.
.chat-widget-message--noticeAdded to an activity notice item.
.chat-widget-message--groupAdded when consecutive messages are grouped.
.chat-widget-message--subtype-*Added for a subtype. The suffix is lowercased and non-CSS-safe characters become -.
.chat-message-containerVisible message or notice container inside an item wrapper.
.chat-widget-group-providersProvider-icon wrapper shown at the start of a grouped message.
.chat-widget-notice-lineAdded to .chat-message-container for a notice.
.chat-widget-notice-headerNotice header containing the platform, type, user and notice text.
.chat-widget-notice-bodyNotice body containing the user message attached to a notice.
.chat-widget-notice-typeNotice subtype or type label.
.chat-widget-notice-userUser who triggered the notice.
.chat-widget-notice-textNotice text content.
.chat-widget-notice-messageUser message attached to a notice.
.chat-message-meta-containerInline wrapper for platform, badges and username metadata.
.chat-message-icons-containerContainer for platform and badge icons.
.chat-message-provider-logoPlatform logo, such as Twitch or YouTube. Its data-provider attribute identifies the platform.
.chat-message-provider-logo-badgeAdded when Badge is selected for Platform logo display. Gives every platform logo a unified square background.
.chat-message-provider-logo-iconProportional inner viewport that centers and contains the provider image or SVG. Target this to adjust a logo’s scale or offset.
.chat-message-badges-containerUser badges, such as subscriber or moderator.
.chat-message-badgeUser badge.
.chat-message-usernameUsername display. Its provider color is set inline, so a forced custom color needs !important.
.chat-message-username-separatorSeparator between username and message.
.chat-message-textMessage text content.
.chat-message-mentionMentions inside messages.
.chat-message-linkLinks inside messages.
.chat-message-emoteEmotes inside messages.
.chat-message-gift-countGift count display, such as bits.
AttributeElementUse
data-message-order="top|bottom".chat-containerCurrent message-order setting. Use it to adapt a custom layout to the edge where new messages appear.
data-message-alignment="left|right".chat-containerCurrent message-alignment setting. Use it to anchor a custom layout to the selected side.
data-chat-message-type="message".chat-widget-messageTarget normal chat messages.
data-chat-message-type="notice".chat-widget-messageTarget activity notices.
data-chat-sub-type="<subtype>".chat-widget-messageTarget the raw message or notice subtype. Omitted when no subtype exists.
data-chat-provider="twitch".chat-widget-messageTarget the lowercase provider, such as twitch, youtube, tiktok, kick, rumble or owncast.
data-provider="twitch".chat-message-provider-logoTarget an individual platform logo. This remains accurate when a grouped message contains logos from multiple platforms.
data-chat-grouped="true".chat-widget-messageTarget an item made from grouped messages. Omitted on ungrouped items.
data-badges="subscriber moderator".chat-message-containerSpace-separated badge types on normal messages. Use [data-badges~="subscriber"] token matching.
VariableValue typeControls
--text-colorCSS colorBuilt-in message and notice text color.
--text-shadow-colorCSS colorBuilt-in four-direction text outline/shadow.
--chat-size-scaleNumberMessage text, icons, emotes, gaps and padding scale. Size presets range from 0.5 to 2.5.
--chat-message-inside-spacingCSS lengthInline spacing between metadata, icons and message parts.
--chat-provider-logo-badge-colorCSS colorProvider-registry background for one platform logo badge. Override background-color on .chat-message-provider-logo-badge in custom CSS.
--chat-widget-font-familyFont family listFont for the entire widget.
--background-colorCSS color tokenResolved background setting available to custom rules.
--background-opacityNumber from 0 to 1Resolved background-opacity setting available to custom rules.
--border-colorCSS color tokenResolved border setting available to custom rules.
--border-widthUnitless pixel numberResolved border-width setting available to custom rules.
--border-radiusUnitless pixel numberResolved border-radius setting available to custom rules.

Text, shadow, size, spacing and font variables affect built-in CSS. For background and border overrides, set the CSS properties directly.

When Badge is selected for Platform logo display, the provider registry supplies each logo’s default background color. Custom widget CSS is loaded after the built-in badge styles, so the class can directly override its size, background, outline and shadow.

.chat-message-provider-logo-badge {
  width: 1.25rem;
  height: 1.25rem;
  background-color: #202124;
  border-radius: 3px;
  box-shadow: none;
  outline: 0;
}

Use data-provider to customize one platform. Target the logo itself instead of the outer message because grouped messages can contain multiple platforms.

.chat-message-provider-logo-badge[data-provider="twitch"] {
  background-color: #9146ff;
}

.chat-message-provider-logo-badge[data-provider="youtube"] {
  background-color: #ffffff;
}

If an asset has uneven internal whitespace, adjust its inner viewport without changing the outer tile alignment.

.chat-message-provider-logo-badge[data-provider="youtube"]
  .chat-message-provider-logo-icon {
  transform: translateY(-2%) scale(0.94);
}

Get a font import, then:

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");

.chat-container {
  --chat-widget-font-family: "Roboto", sans-serif;
}
.chat-message-container {
  box-sizing: border-box;
  max-width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a0736, #31176a);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 0 12px rgba(190, 150, 255, 0.25),
    inset 0 0 4px rgba(255, 255, 255, 0.1);
}

If the predefined sizes do not fit your layout, customize the size with --chat-size-scale.

.chat-container {
  --chat-size-scale: 0.67;
}

Set a fixed width for chat bubbles when you want a more uniform look.

.chat-message-container {
  width: min(400px, 100%);
}

Use data-chat-sub-type to hide one notice subtype.

.chat-widget-message[data-chat-sub-type="sub"] {
  display: none;
}

You can style messages differently based on user badges.

.chat-message-container[data-badges~="subscriber"] {
  border-inline-start: 4px solid #70c973;
  padding-inline-start: 0.75rem;
}

.chat-message-container[data-badges~="vip"] {
  border-inline-start: 4px solid #b0abe4;
  padding-inline-start: 0.75rem;
}

.chat-message-container[data-badges~="moderator"] .chat-message-username {
  color: #e39162 !important;
}