Variables
Variables let you display dynamic values in your overlay or chat bot. Unlike with Functions however you cannot add in any extra parameters.
The format for using variables is {{variable_name}}. There can be no spaces in-between the word and the curly brackets. Variables can be used inside Functions but not the other way around.
For overlays
When used in the text field of a Text Widget or similar, they will display their value and automatically refresh when the value changes.
Alert variables
Text widgets placed inside a Custom Alert Box Widget can reference the firing alert's individual fields via the {{alert.<field>}} namespace — for example {{alert.name}}, {{alert.bits}}, {{alert.streak_months}}. The same handles work inside the streamer-configured display message and TTS message templates in Alert Configuration. See the full alert variable reference.
Fallbacks and conditions
A variable can supply a fallback for when it has no value, or pick between two texts based on its value — right inside the {{ }}.
Fallbacks and conditions work anywhere Community resolves {{variables}} — overlay text and widgets, chat bot messages, alert messages (display and TTS), Flow text, and Chatbox messages.
Fallbacks
Show a value, or some backup text when the variable is empty:
{{points ?? "0"}}— shows the fallback only when the variable has no value at all (it isn't set). A real0or an empty message is kept as-is.{{points || "0"}}— shows the fallback when the variable is unset, empty,0, orfalse. Use this when a0should read as "nothing yet".
The fallback text must be wrapped in quotes. It can itself contain a Function:
Your roll: {{roll ?? $(random 1 6)}}
An older single-pipe form,
{{points | "0"}}, still works — it behaves like??but also falls back on an empty message.
Conditions
Pick one of two texts based on a variable's value:
{{is_subscribed ? "Thanks for subscribing!" : "Consider subscribing!"}}
Both texts are quoted. The variable counts as "yes" unless it is empty, 0, false, no, or off — so a value like the string false correctly reads as "no".
Keep the two texts as plain quoted strings — a condition can't contain another {{variable}} inside its branches.