Expression function reference

Reference for operators, built-in functions, format patterns, and limits in design overlay expressions.

This reference lists every operator, built-in function, format pattern, and ceiling supported by Strave design overlay expressions. Every function is pure and deterministic, so the same live match data always produces the same output in the editor and on air.

Design overlay expressions are in preview as part of Phase 3 of the graphics roadmap. Signatures and available functions may change before general release.

Operators and precedence

Operators are evaluated from top (highest precedence) to bottom (lowest precedence). Use parentheses (...) whenever you want to group an expression explicitly.

PriorityOperatorsPurposeExample
1.field, [index]Property lookup and zero-based list indexmatch.maps[1].winner
2-xNumeric negation-item.roundDifferential
3|Pipe value as first argument to a functionteam.a.name | upper
4*, /, %Multiply, divide, remaindermatch.bestOf / 2
5+, -Add or concatenate text, subtractindex + 1
6??Fallback when left side is nullteam.a.name ?? "TBD"
7<, <=, >, >=Order comparison (numbers or text)match.bestOf >= 3
8==, !=Exact equality and inequalityitem.status == "picked"
9notBoolean negationnot item.current
10andBoolean AND (short-circuits)match.bestOf >= 3 and match.teams.a.score >= 2
11orBoolean OR (short-circuits)item.status == "picked" or item.status == "decider"

Keep three operator rules in mind:

  • + adds two numbers or joins two text values. It doesn't mix numbers and text. Convert the number first with text(...) or format(...).
  • Division or remainder by 0 returns null rather than an error.
  • Boolean operators require boolean inputs (true, false, or null, where null acts as false). Use and, or, and not instead of &&, ||, and !.

Formatting functions

Formatting functions turn numbers, timestamps, and durations into display text. All formatting is independent of your operating system's locale so every OBS and vMix machine renders the exact same output.

FunctionSignatureDescription and example
formatformat(number, pattern)Formats a number with a pattern string. format(0.742, "0.0%") returns "74.2%".
formatDateformatDate(timestampMs, pattern, timezone?)Formats a Unix millisecond timestamp. Defaults to "UTC". formatDate(match.scheduledAt, "HH:mm [UTC]") returns "19:30 UTC".
formatDurationformatDuration(ms, pattern?)Formats a duration in milliseconds using "mm:ss" (default) or "HH:mm:ss". formatDuration(185000) returns "03:05".
ordinalordinal(number)Returns the English ordinal form. ordinal(1) returns "1st", ordinal(12) returns "12th".
texttext(value)Converts a number, boolean, or colour to text. text(match.teams.a.score) returns "2".

Number format patterns

Pass a literal pattern string to format(value, pattern):

  • 0 prints a required digit, padding with zeros when needed (format(7, "00") returns "07").
  • # prints an optional digit, omitting leading or trailing zeros (format(1.2, "0.0#") returns "1.2").
  • , adds thousands grouping (format(12500, "#,##0") returns "12,500").
  • + at the start forces a + sign on positive numbers while leaving 0 unsigned (format(14, "+0") returns "+14", format(0, "+0") returns "0", format(-3, "+0") returns "-3").
  • % at the end multiplies by 100 and appends % (format(0.684, "0.0%") returns "68.4%").

Numbers round half-away-from-zero (format(1.235, "0.00") returns "1.24").

Date and time patterns

Pass a literal pattern string and an optional IANA timezone name (such as "Europe/Berlin" or "America/New_York") to formatDate. Wrap literal text inside square brackets so tokens aren't expanded (for example "[UTC]").

TokenOutputExample
YYYY / YY4-digit or 2-digit year2026 / 26
MMMM / MMMFull or 3-letter month nameNovember / Nov
MM / MZero-padded or unpadded month11 / 11
DD / DZero-padded or unpadded day07 / 7
dddd / dddFull or 3-letter weekdayFriday / Fri
HH / H24-hour clock (00 to 23)19 / 9
hh / h12-hour clock (01 to 12)07 / 7
mm / ss2-digit minute or second05 / 09
A / aUppercase or lowercase meridiemPM / pm
ZNumeric UTC offset+01:00 or Z

Text functions

Text functions count and slice by Unicode characters so accented letters and symbols never split in half. All text functions return null when given null, except contains, startsWith, and endsWith (which return false).

FunctionSignatureDescription and example
upperupper(text)Converts text to uppercase. upper("Bank") returns "BANK".
lowerlower(text)Converts text to lowercase. lower("CLUBHOUSE") returns "clubhouse".
trimtrim(text)Removes leading and trailing whitespace. trim(" G2 ") returns "G2".
padStartpadStart(value, length, fill?)Pads text or a number on the left (default fill " "). padStart(3, 2, "0") returns "03".
padEndpadEnd(value, length, fill?)Pads text or a number on the right (default fill " "). padEnd("EU", 4, ".") returns "EU..".
truncatetruncate(text, maxLength, suffix?)Shortens text past maxLength and appends suffix (default "...").
sliceslice(text, start, end?)Extracts characters from start (inclusive) to end (exclusive). Negative indices count from the end.
replacereplace(text, search, replacement)Replaces every literal match of search with replacement.
lengthlength(text)Returns the character count. length("BDS") returns 3.
containscontains(text, needle)Returns true when text contains needle (case-sensitive).
startsWithstartsWith(text, prefix)Returns true when text starts with prefix.
endsWithendsWith(text, suffix)Returns true when text ends with suffix.
joinjoin(textList, separator)Joins non-null text entries with separator. playday.casters | join(" & ") returns "Demo Caster & Replay Desk".

Number functions

Number functions propagate null except min and max, which return the non-null value when only one side is missing.

FunctionSignatureDescription and example
roundround(number, decimals?)Rounds half-away-from-zero to decimals places (default 0).
floorfloor(number)Rounds down to the nearest integer. floor(2.9) returns 2.
ceilceil(number)Rounds up to the nearest integer. ceil(match.bestOf / 2) returns 2 for a Bo3.
absabs(number)Returns the non-negative magnitude. abs(-4) returns 4.
clampclamp(number, low, high)Keeps a number inside [low, high]. clamp(scoreA, 0, 3).
minmin(a, b)Returns the smaller of two numbers.
maxmax(a, b)Returns the larger of two numbers.

Colour literals and functions

Write colour literals directly with #RGB, #RRGGBB, or #RRGGBBAA (for example #FF7700 or #151A21CC). Use colour functions to parse or adjust alpha values:

FunctionSignatureDescription and example
colourcolour(text)Parses a hex colour string into a colour value, or null if invalid.
alphaalpha(colour, opacity)Sets opacity between 0 and 1. alpha(branding.primary, 0.25).

Conditional functions

Conditionals only evaluate the branch that matches. Both branches must return compatible types.

FunctionSignatureDescription and example
ifif(condition, thenValue, elseValue?)Returns thenValue when condition is true, otherwise elseValue (or null when omitted). if(match.bestOf >= 3, "SERIES", "BO1").
switchswitch(value, case1, result1, ..., defaultValue?)Compares value against each case in order and returns the first matching result, or defaultValue (or null when omitted). switch(item.status, "picked", "PICK", "banned", "BAN", "DECIDER").

List functions

List functions work on catalog lists such as match.maps, match.veto, and playday.matches. Field names (such as "status" or "stats.kost") must be literal strings so the editor can check them against the catalog.

FunctionSignatureDescription and example
countcount(list)Returns the number of items (0 when null). match.maps | count.
firstfirst(list)Returns the first item, or null when empty. playday.casters | first.
lastlast(list)Returns the last item, or null when empty. match.maps | last.
taketake(list, n)Keeps at most the first n items. playday.matches | take(4).
skipskip(list, n)Drops the first n items. event.standings | skip(4) | take(4) (Planned).
sortsort(list, field, direction?)Stable sort by field with "asc" (default) or "desc". Missing values always sort last. match.maps | sort("number", "desc").
filterfilter(list, field, op, value)Keeps items matching op ("==", "!=", "<", "<=", ">", ">=", "contains", "startsWith", "endsWith"). match.veto | filter("status", "==", "picked").
sumsum(list, field?)Adds all non-null numbers for field (0 when empty). match.teams.a.players | sum("stats.kills") (Planned).
avgavg(list, field?)Averages all non-null numbers for field (null when empty). match.teams.a.players | avg("stats.kost") (Planned).
minmin(list, field?)Smallest non-null number for field (null when empty).
maxmax(list, field?)Largest non-null number for field (null when empty).

Chain filter stages with pipes when you need multiple conditions:

match.veto | filter("status", "==", "banned") | filter("team", "==", "a") | count

Limits

Strave enforces fixed limits on expressions so every overlay renders in under a millisecond in OBS and vMix without blocking frames.

ResourceLimit
Single expression length512 characters
Full text template length2,048 characters
{ ... } blocks per text layer16
Pipe stages in one chain8
Function or switch arguments21 (up to 10 cases plus default)
Items rendered by one repeat group64 (default cap: 32)
Repeat group nesting depth1 (no nested repeat groups)
Output length of padStart, padEnd, replace, or join256 characters

Next steps