52 of 54 in the Pitchside pack

xG Race: Stat & chart element for AI agents

Two expected-goals bars race up to the final xG with the value counting, and the actual goals land as balls under each bar..

  • 1:1native
  • 16:9native
  • 9:16native
  • 4:5native

Watermarked preview. The Pitchside pack includes all 54 elements, clean and editable, in every size.

Paste this into Claude Code

Use the AgentFrames Pitchside pack. Add a `xgRace` beat to plan.json on a `k` canvas with slots `kicker`, `title`, `a` and `b` from my script. Then run validate → build → qa and show me qa/contact.jpg.

Variables

The slots your agent fills from your script, through plan.json.

SlotTypeWhat it holdsExample
kickerstringkicker: {"type":"string","minLength":0,"maxLength":14}.
titlestringtitle: {"type":"string","minLength":1,"maxLength":32}.Robbed? The *xG* says yes
astringa: JSON string. {"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":6},"xg":{"type":"number","minimum":0,"maximum":10},"goals":{"type":"integer","minimum":0,"maximum":9}},"required":["name","xg"]}.{"name":"KGS","xg":2.41,"goals":1}
bstringb: JSON string. {"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":6},"xg":{"type":"number","minimum":0,"maximum":10},"goals":{"type":"integer","minimum":0,"maximum":9}},"required":["name","xg"]}.{"name":"RVR","xg":0.87,"goals":2}

What your agent can change

xG Race. Native 1920×1080, 5s at 30fps. A cutaway on the broadcast stage.

Two expected-goals bars race up to the final xG with the value counting, and the actual goals land as balls under each bar.

Motion. Bars grow (ease-out, 1.2 s) with the counts; balls pop 0.1 s apart. Why it moves. clarity: "we deserved it" in one picture.

Mount

Copy every manifest file into your project (plus af-pitchside-runtime). Mount with a unique host id, data-composition-id="af-pitchside-xg-race-16x9", data-composition-src="compositions/af-pitchside-xg-race-16x9.html", data-duration and data-variable-values. A longer data-duration than 5s extends the hold (the exit moves to the end of the mount). Use the variant whose size matches your project: each is laid out natively, never scaled.

Content slots

Nested slots are JSON strings. Every slot is checked against constraints.json and measured against the layout before anything draws; the block stops with a message naming the slot and the fix (it never truncates or shrinks text).

  • kicker: {"type":"string","minLength":0,"maxLength":14}
  • title (required): {"type":"string","minLength":1,"maxLength":32}
  • a (required): {"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":6},"xg":{"type":"number","minimum":0,"maximum":10},"goals":{"type":"integer","minimum":0,"maximum":9}},"required":["name","xg"]}
  • b (required): {"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":6},"xg":{"type":"number","minimum":0,"maximum":10},"goals":{"type":"integer","minimum":0,"maximum":9}},"required":["name","xg"]}

Brand and layout

Brand variables (defaults from brand.json): colourway, accent, creator, handle, channel, tagline, monogram, ctaFollow, ctaLink, ctaCode. Layout: exit (wipe or hold).

Example

``json { "kicker": "", "title": "Robbed? The *xG* says yes", "a": "{\"name\":\"KGS\",\"xg\":2.41,\"goals\":1}", "b": "{\"name\":\"RVR\",\"xg\":0.87,\"goals\":2}" } ``

FAQ

What can my AI agent change in xG Race?

Your agent fills the kicker, title, a and b slots through the block's data-variable-values (or the starter project's variables). Motion, timing, palette, fonts and the internal layout are protected, so the result keeps the Pitchside look.

Which aspect ratios does xG Race support?

xG Race is designed natively for 16:9, 9:16, 4:5 and 1:1. A typical beat lasts 5s.

How do I get xG Race?

xG Race is included in the Pitchside pack, which is part of the AgentFrames All-access subscription along with 53 other templates in this pack and every other pack on the store. You get the full source, the editing contracts and the agent instructions.

This is 1 of 54

Get the full Pitchside pack

xG Race comes as part of Pitchside: 54 elements, 4 starter videos and every size (16:9, 9:16, 4:5, 1:1), re-brandable to your colours in one file. Included in All-access with every other pack.

See the whole pack →

Full frame (16:9) · 23s · made entirely with this pack

More in Pitchside

See all 54 elements in Pitchside →