# Bar race: Stat & chart element for AI agents

> 2-6 horizontal bars from a zero baseline, sorted by value, one highlighted; the bars grow and the values count to their exact figures. Takes a source line.

Canonical page: https://agentframes.ai/elements/glide/bar-race/
Markdown: https://agentframes.ai/elements/glide/bar-race.md

## Overview

- Name: Bar race (`barRace`), an element: one HyperFrames block per size
- Part of: the [Glide](https://agentframes.ai/packs/glide.md) pack (27 of 50). Available only through the All-access subscription.
- Category: Stat & chart
- Purpose: 2-6 horizontal bars from a zero baseline, sorted by value, one highlighted; the bars grow and the values count to their exact figures. Takes a source line.
- Pack: [Glide](https://agentframes.ai/packs/glide.md), included in All-access (from $14/month billed annually ($168/year), or $19 monthly)
- Subscribe: POST https://agentframes.ai/api/checkout/subscribe with interval=month or interval=year (optional currency=USD|GBP|EUR|AUD|CAD; 303 redirect to Stripe checkout; a human pays there). Then download any pack with the subscriber key: https://agentframes.ai/account.md
- Aspects: 16:9 (native), 9:16 (native), 4:5 (native), 1:1 (native)
- Canvases: works on Day · Apricot (`apricot-day`), Dusk · Apricot (`apricot-dusk`), Day · Lagoon (`lagoon-day`), Dusk · Lagoon (`lagoon-dusk`), Day · Iris (`iris-day`), Dusk · Iris (`iris-dusk`); avoid none
- Typical duration: 5s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/glide/bar-race.mp4
- Poster: https://agentframes.ai/media/glide/bar-race.jpg
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Glide pack. Add a `barRace` beat to plan.json on a `apricot-day` canvas with slots `eyebrow`, `title`, `bars`, `highlight`, `prefix`, `suffix` and `source` from my script. Then run validate → build → qa and show me qa/contact.jpg.
```

## Variables

| Variable | Type | Label | Description | Default |
|---|---|---|---|---|
| `eyebrow` | string | eyebrow | {"type":"string","minLength":0,"maxLength":28} | Time to book |
| `title` | string | title | {"type":"string","minLength":1,"maxLength":36} | Booked in *minutes*, not days. |
| `bars` | string | bars | {"type":"array","minItems":2,"maxItems":6,"items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":16},"value":{"type":"number","minimum":0,"maximum":1000000000}},"required":["label","value"]}} | [{"label":"Email","value":52},{"label":"DMs","value":38},{"label":"Phone","value":24},{"label":"Quilla","value":3}] |
| `highlight` | number | highlight | {"type":"integer","minimum":-1,"maximum":5} | 3 |
| `prefix` | string | prefix | {"type":"string","minLength":0,"maxLength":2} |  |
| `suffix` | string | suffix | {"type":"string","minLength":0,"maxLength":4} |  h |
| `source` | string | source | {"type":"string","minLength":0,"maxLength":48} | Illustrative · hours to a confirmed booking |

## What your agent can change

Bar race · pilot role: Ranking. 2-6 horizontal bars from a zero baseline, sorted by value, one highlighted; the bars grow and the values count to their exact figures. Takes a source line.

Why it moves: change: bars race out from a zero baseline to honest values with the counts keeping pace, sorted so the leader is on top

Native 1920×1080, 5s at 30 fps. Graphics only (no footage). Use the matching aspect variant; never stretch another size.

### Mount
Copy every manifest file path→target, plus `af-glide-runtime`. Mount with a unique host id, `data-composition-id="af-glide-bar-race-16x9"`, `data-composition-src="compositions/af-glide-bar-race-16x9.html"` and `data-variable-values` (JSON object). The starter projects already contain everything.

### Slots (content)
- `eyebrow`: {"type":"string","minLength":0,"maxLength":28}
- `title`: {"type":"string","minLength":1,"maxLength":36}
- `bars`: JSON string; {"type":"array","minItems":2,"maxItems":6,"items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":16},"value":{"type":"number","minimum":0,"maximum":1000000000}},"required":["label","value"]}}
- `highlight`: {"type":"integer","minimum":-1,"maximum":5}
- `prefix`: {"type":"string","minLength":0,"maxLength":2}
- `suffix`: {"type":"string","minLength":0,"maxLength":4}
- `source`: {"type":"string","minLength":0,"maxLength":48}

Nested slots are JSON strings inside `data-variable-values`. A `panel` is a ui.json block: `{"type":"list","title":"...","rows":[{"title","meta","badge","icon"}]}`, or `{"type":"shot","src":"data:image/png;base64,..."}` for a screenshot (where the slot allows it).

### Style
`brandName` (1-24), `logo` (empty → monogram app icon, or an inline base64 image), `look` (day | dusk), `colourway` (apricot | lagoon | iris), `accent` (empty or #RRGGBB, overrides the colourway accent), `timeOffset` (seconds of film time at this scene; keeps the drifting background continuous across cuts).

Headline syntax: `\n` breaks a line. `*word*` is the key word (accent colour).

### Limits and errors
Out-of-range input stops the block with a message on `data-glide-error` and in the console (for example "steps has 5 items; supported: 2-4"). Copy that is within the character limits but still too wide or tall for this size is also refused ("does not fit the 16x9 layout"), never shrunk. Everything has landed by 3.0s; the last 0.4 s is the outro.

Source: editable HTML + local GSAP and fonts. Deterministic (no randomness, no clock). See the pack LICENCE.md and NOTICE.

## FAQ

### What can my AI agent change in Bar race?

Your agent fills the `eyebrow`, `title`, `bars`, `highlight`, `prefix`, `suffix` and `source` 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 Glide look.

### Which aspect ratios does Bar race support?

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

### How do I get Bar race?

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

## More in Glide

- [Dashboard rise](https://agentframes.ai/elements/glide/dashboard-rise.md): A dashboard card rises from a tilt; a line chart (zero baseline, labelled max) draws, the KPI counts to its exact value and a 2-4 part ring fills. Takes a source line.
- [Price count](https://agentframes.ai/elements/glide/price-count.md): A plan card beside the header: an optional anchor price is struck through, the price counts down (or up from zero) to its exact value, then up to 4 inclusions tick in.
- [Stat trio](https://agentframes.ai/elements/glide/stat-trio.md): 2-3 stat tiles (in a row, stacked in 9:16) count up one after another to exact values with prefix/suffix; takes a source line.
- [Number roll](https://agentframes.ai/elements/glide/number-roll.md): A big number whose digits roll like a slot machine and stop left to right on the exact value (prefix/suffix optional), with a label below.

## Community

Coming soon.
