StreamLabs Howto portal
From this page you can find custom HTML/CSS for stream widgets.
Viewers Count
HTML
<!-- all platforms will be added to this container -->
<div id="platform_container"></div>
<!-- platform item -->
<script type="text/template" id="platform_item">
<span id="{platform}_container" style="position:relative;animation-timing-function: ease-in-out;animation-fill-mode: both;animation-name: {platform};animation-duration: 1.35s;font: {font_weight} {font_size} {font}; margin:2px;">
<i class="fa fa-{platform} platform-icon" style="color:{platform_color};margin:6px;"></i>
<img class="platform-img" width="32" height="32">
<span style="color:{font_color};margin:6px;" class="{platform}-count"></span></span>
</script>
CSS
#mixer_container {
border-radius: 18px;
border: 2px solid blue;
-webkit-animation: mixer 0.5s infinite;
animation: mixer 0.5s infinite;
}
#youtube_container {
border-radius: 18px;
border: 2px solid red;
-webkit-animation: youtube 0.5s infinite;
animation: youtube 0.5s infinite;
}
#twitch_container {
border-radius: 18px;
border: 2px solid purple;
-webkit-animation: twitch 0.5s infinite;
animation: twitch 0.5s infinite;
}
@-webkit-keyframes twitch {
0% {top:2;right:0;bottom:4;left:0;}
50% {top:2;right:-2;bottom:4;left:2;}
75% {top:4;right:-2;bottom:2;left:2;}
100% {top:4;right:2;bottom:2;left:-2;}
0% {background: rgba(0, 0, 32, 0.05);}
50% {background: rgba(32, 0, 64, 0.15);}
75% {background: rgba(48, 0, 128, 0.35);}
100% {background: rgba(86, 0, 172, 0.15);}
}
@keyframes twitch {
0% {top:2;right:0;bottom:4;left:0;}
50% {top:2;right:-2;bottom:4;left:2;}
75% {top:4;right:-2;bottom:2;left:2;}
100% {top:4;right:2;bottom:2;left:-2;}
0% {background: rgba(0, 0, 32, 0.05);}
50% {background: rgba(32, 0, 64, 0.15);}
75% {background: rgba(48, 0, 128, 0.35);}
100% {background: rgba(86, 0, 172, 0.15);}
}
@-webkit-keyframes youtube {
0% {top:2;right:0;bottom:4;left:0;}
50% {top:2;right:-2;bottom:4;left:2;}
75% {top:4;right:-2;bottom:2;left:2;}
100% {top:4;right:2;bottom:2;left:-2;}
0% {background: rgba(32, 0, 0, 0.05);}
50% {background: rgba(64, 0, 0, 0.15);}
75% {background: rgba(128, 0, 0, 0.35);}
100% {background: rgba(172, 0, 0, 0.15);}
}
@keyframes youtube {
0% {top:2;right:0;bottom:4;left:0;}
50% {top:2;right:-2;bottom:4;left:2;}
75% {top:4;right:-2;bottom:2;left:2;}
100% {top:4;right:2;bottom:2;left:-2;}
0% {background: rgba(32, 0, 0, 0.05);}
50% {background: rgba(64, 0, 0, 0.15);}
75% {background: rgba(128, 0, 0, 0.35);}
100% {background: rgba(172, 0, 0, 0.15);}
}
@-webkit-keyframes mixer {
0% {top:2;right:0;bottom:4;left:0;}
50% {top:2;right:-2;bottom:4;left:2;}
75% {top:4;right:-2;bottom:2;left:2;}
100% {top:4;right:2;bottom:2;left:-2;}
0% {background: rgba(0, 0, 32, 0.05);}
50% {background: rgba(0, 0, 64, 0.15);}
75% {background: rgba(0, 0, 128, 0.35);}
100% {background: rgba(0, 0, 172, 0.15);}
}
@keyframes mixer {
0% {top:2;right:0;bottom:4;left:0;}
50% {top:2;right:-2;bottom:4;left:2;}
75% {top:4;right:-2;bottom:2;left:2;}
100% {top:4;right:2;bottom:2;left:-2;}
0% {background: rgba(0, 0, 32, 0.05);}
50% {background: rgba(0, 0, 64, 0.15);}
75% {background: rgba(0, 0, 128, 0.35);}
100% {background: rgba(0, 0, 172, 0.15);}
}
Tip Ticker
HTML
<div id="marquee-wrapper">
<!-- item will be added or removed by checking div id -->
<!-- don't remove id if you want to use current adding and removing logic -->
<div class="marquee" style="animation: 'initial'; '-webkit-animation': 'initial'" id="item_container">
</div>
</div>
<!-- item row template -->
<script type="text/template" id="ticker_item">
<div class="item" style="font: {font_weight} {font_size} {font}; display: inline-block; margin: 0 20px; color: {font_color}">
{message}
</div>
</script>
CSS
body, #custom_html {
width: 100%;
height: 100%;
margin: 0;
}
#marquee-wrapper > div {
white-space: nowrap;
padding-left: 100%;
display: inline-block;
}
#marquee-wrapper {
position: relative;
top: 45%;
transform: translateY(-50%); /* or try 50% */
overflow: hidden;
}
/* Make it move */
@keyframes marquee {
0% { transform: translate(0, 0); }
100% { transform: translate(-100%, 0); }
}
@-webkit-keyframes marquee {
from { -webkit-transform: translate(0, 0); }
to { -webkit-transform: translate(-100%, 0); }
}
Event List
HTML
<script type="text/template" id="eventlist_item">
<li class="{eventType}">
<div class="background"></div>
<div>
<span class="tag">{tag}</span>
<span class="message" style="width:10em;">{from}</span>
</div>
</li>
</script>
CSS
@import url("https://fonts.googleapis.com/css?family={font_family}");
html, .widget-EventList li > div {
-webkit-transform: rotateX({rotate_x}) rotateY({rotate_y});
transform: rotateX({rotate_x}) rotateY({rotate_y});
}
.widget-EventList, .widget-EventList * {
box-sizing: border-box;
}
.widget-EventList {
font-weight: 600;
font-size: 18px;
font-family: "Luckiest Guy","Mono","Roboto";
color: {text_color};
background: none;
overflow: hidden;
list-style: none;
-webkit-columns: 2;
-moz-columns: 2;
columns: 2;
padding: 0px;
text-transform: uppercase;
position: relative;
}
.widget-EventList li {
width: 100%;
position: relative;
-webkit-animation: {show_animation} {animation_speed} forwards;
animation: {show_animation} {animation_speed} forwards;
}
.widget-EventList li > div:first-child {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 4px;
opacity: 0.0;
-webkit-transition: opacity {animation_speed};
transition: opacity {animation_speed};
}
.widget-EventList li > div:last-child {
overflow: hidden;
position: relative;
margin-bottom: 2px;
padding: 0 12px;
opacity: 1;
font-size: 12px;
height: 14px;
line-height: 14px;
-webkit-animation: growB {animation_speed} forwards;
animation: growB {animation_speed} forwards;
}
.widget-EventList li:first-child > div:first-child {
opacity: 1;
}
.widget-EventList li:first-child > div:last-child {
-webkit-animation: growA {animation_speed} forwards;
animation: growA {animation_speed} forwards;
}
.widget-EventList li:nth-child(n+{max_events}) {
-webkit-animation: {hide_animation} {animation_speed} forwards;
animation: {hide_animation} {animation_speed} forwards;
}
@-webkit-keyframes growA {
0% {
opacity: 0;
font-size: 0em;
height: 0em;
line-height: 0em;
margin-bottom: 0px;
padding: 0;
}
100% {
opacity: 1;
font-size: 1em;
height: 1.6em;
line-height: 1.6em;
margin-bottom: 0px;
padding: 0 10px;
}
}
@keyframes growA {
0% {
opacity: 0;
font-size: 0em;
height: 0em;
line-height: 0em;
margin-bottom: 0px;
padding: 0;
}
100% {
opacity: 1;
font-size: 16px;
height: 16px;
line-height: 16px;
margin-bottom: 2px;
margin-top:0px;
padding: 0 2px;
}
}
@-webkit-keyframes growB {
0% {
opacity: 1;
font-size: 1em;
height: 1.6em;
line-height: 1.6em;
}
}
@keyframes growB {
0% {
opacity: 1;
font-size: 1em;
height: 1.6em;
line-height: 1.6em;
}
}
.widget-EventList .tag {
font-size: 10px;
line-height: 10px;
top: 2px;
right: 2px;
position: absolute;
}
.widget-EventList .message {
padding-right: 0px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.widget-EventList li {
text-shadow: 0 0 1px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.7), 0 0 3px rgba(0, 0, 0, 0.7);
}
.widget-EventList li > div:first-child {
-webkit-filter: sepia(100%) brightness(250%) saturate(300%) hue-rotate(-45deg) hue-rotate({hue}) brightness({brightness}) saturate({saturation});
filter: sepia(100%) brightness(250%) saturate(300%) hue-rotate(-45deg) hue-rotate({hue}) brightness({brightness}) saturate({saturation});
background: -webkit-linear-gradient(63deg, #151515 5px, transparent 5px) 0 5px, -webkit-linear-gradient(243deg, #151515 5px, transparent 5px) 10px 0px, -webkit-linear-gradient(63deg, #222 5px, transparent 5px) 0px 10px, -webkit-linear-gradient(243deg, #222 5px, transparent 5px) 10px 5px, -webkit-linear-gradient(0deg, #1b1b1b 10px, transparent 10px), -webkit-linear-gradient(#1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424);
background: linear-gradient(27deg, #151515 5px, transparent 5px) 0 5px,
linear-gradient(207deg, #151515 5px, transparent 5px) 10px 0px,
linear-gradient(27deg, #222 5px, transparent 5px) 0px 10px,
linear-gradient(207deg, #222 5px, transparent 5px) 10px 5px,
linear-gradient(90deg, #1b1b1b 10px, transparent 10px),
linear-gradient(#1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424);
background-color: #131313;
background-size: 100px 100px;
}
Have you ever wanted a custom font for your Stream alert
CSS Fonts
HTML
<div id="marquee-wrapper">
<!-- item will be added or removed by checking div id -->
<!-- don't remove id if you want to use current adding and removing logic -->
<div class="marquee" style="animation: 'initial'; '-webkit-animation': 'initial'" id="item_container">
</div>
</div>
<!-- item row template -->
<script type="text/template" id="ticker_item">
<div class="item" style="font: {font_weight} {font_size} {font}; display: inline-block; margin: 0 20px; color: {font_color}">
{message}
</div>
</script>
CSS
body, #custom_html {
width: 100%;
height: 100%;
margin: 0;
}
#marquee-wrapper > div {
white-space: nowrap;
padding-left: 100%;
display: inline-block;
}
#marquee-wrapper {
position: relative;
top: 45%;
transform: translateY(-50%); /* or try 50% */
overflow: hidden;
}
/* Make it move */
@keyframes marquee {
0% { transform: translate(0, 0); }
100% { transform: translate(-100%, 0); }
}
@-webkit-keyframes marquee {
from { -webkit-transform: translate(0, 0); }
to { -webkit-transform: translate(-100%, 0); }
}