Skip to content

Leaderboard

Leaderboard ranks viewers by the activity types you choose. Use it for gifted subs, total subs, tips, bits, follows or a mixed leaderboard where several activity types should count together.

You define how much each activity type is worth. Other currencies will be converted into your preferred one using today’s rates. Activity types start from the default activity value and can be fine-tuned in the source settings.

Leaderboard editor
  1. Open the Synchra Dashboard.
  2. Go to Widgets.
  3. Create a Leaderboard widget.
  4. Enter a title, start date and optional end date.
  5. Pick how many places to show.
  6. Pick Points or Currency display.
  7. Select which sources should count toward the leaderboard.
  8. Click Widget URL and copy the URL.
  9. Add it to OBS as a Browser Source.

You can customize the title, number of places, sort direction, default activity value, display mode, unit, currency, dates, sources, multipliers, colors, font, size, padding, row gap, border and visibility settings.

Leaderboard can be styled using custom CSS. Start with the built-in settings first. Use custom CSS when you need a specific layout, shadow, background or animation detail.

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

Simplified generated markup; optional elements are marked.

<section class="leaderboard-widget" data-display-mode="points">
  <div class="leaderboard-widget__title">Top supporters</div> <!-- Optional -->
  <div class="leaderboard-widget__rows">
    <div
      class="leaderboard-widget__row"
      data-target="leaderboard-row"
      data-position="1"
    >
      <span class="leaderboard-widget__rank"> <!-- Optional -->
        <span class="leaderboard-widget__rank-number">1</span>
        <span class="leaderboard-widget__rank-suffix">.</span>
      </span>
      <span class="leaderboard-widget__name">Viewer name</span>
      <span class="leaderboard-widget__value">1,250</span> <!-- Optional -->
    </div>
    <!-- More .leaderboard-widget__row elements -->
  </div>
  <div class="leaderboard-widget__deadline">2 days left</div> <!-- Optional -->
</section>

Layout: vertical row list; each row uses rank | flexible name | value. Long names are truncated.

ClassDescription
.leaderboard-widgetRoot container. It owns the widget theme variables.
.leaderboard-widget--disabledAdded when disabled. The built-in CSS lowers its opacity in previews.
.leaderboard-widget__titleOptional centered leaderboard title.
.leaderboard-widget__rowsVertical row list. --leaderboard-widget-row-gap controls its gap.
.leaderboard-widget__rowRepeated flex row containing rank, name and value.
.leaderboard-widget__rankOptional rank wrapper. Uses tabular numerals.
.leaderboard-widget__rank-numberNumeric portion of the rank.
.leaderboard-widget__rank-suffixVisual punctuation after the rank, such as ..
.leaderboard-widget__nameViewer display name. The built-in style truncates it with an ellipsis.
.leaderboard-widget__valueOptional score or currency amount. Uses tabular numerals.
.leaderboard-widget__deadlineOptional time-left text below all rows.
AttributeElementDescription
data-display-mode="points".leaderboard-widgetValues are formatted as points.
data-display-mode="currency".leaderboard-widgetValues are formatted as currency.
data-target="leaderboard-row".leaderboard-widget__rowStable marker applied to every row.
data-position="1".leaderboard-widget__rowNumeric row position. Use any positive number in selectors, not only 1.
VariableValue typeControls
--leaderboard-widget-title-colorCSS colorTitle color.
--leaderboard-widget-text-colorCSS colorDefault row text color.
--leaderboard-widget-secondary-text-colorCSS colorRank and deadline color.
--leaderboard-widget-value-colorCSS colorScore or amount color.
--leaderboard-widget-background-colorCSS colorRoot background. Alpha colors keep the OBS canvas visible.
--leaderboard-widget-row-background-colorCSS colorBackground of every row.
--leaderboard-widget-border-colorCSS colorRoot border color.
--leaderboard-widget-border-widthCSS lengthRoot border width.
--leaderboard-widget-border-radiusCSS lengthRoot radius; rows derive a smaller radius from it.
--leaderboard-widget-row-gapCSS lengthVertical space between rows.
--leaderboard-widget-paddingCSS lengthSpace inside the root.
--leaderboard-widget-font-familyFont family listFont for the entire widget.
--leaderboard-widget-font-sizeCSS lengthBase text size.
--leaderboard-widget-min-widthCSS length or percentageMinimum root width.
--leaderboard-widget-max-widthCSS length or percentageMaximum root width.

Set theme variables on .leaderboard-widget.

Get a font import, then:

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

.leaderboard-widget {
  --leaderboard-widget-font-family: "Roboto", sans-serif;
}
.leaderboard-widget__row[data-position="1"] {
  box-shadow: 0 0 14px var(--leaderboard-widget-value-color);
}