# Live total + metric: Stat & chart element for AI agents

> Checkout line items add and the total ticks to their exact sum; a metric counts up over honest bars.

Canonical page: https://agentframes.ai/elements/launchkit/live-total/
Markdown: https://agentframes.ai/elements/launchkit/live-total.md

## Overview

- Name: Live total + metric (`liveTotal`), an element: one HyperFrames block per size
- Part of: the [Launchkit](https://agentframes.ai/packs/launchkit.md) pack (8 of 50). Available only through the All-access subscription.
- Category: Stat & chart
- Purpose: Checkout line items add and the total ticks to their exact sum; a metric counts up over honest bars.
- Pack: [Launchkit](https://agentframes.ai/packs/launchkit.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 Midnight · Ion (`ion`), Midnight · Aurora (`aurora`), Midnight · Ember (`ember`), Paper · Signal (`signal`), Paper · Cobalt (`cobalt`), Paper · Moss (`moss`); avoid none
- Typical duration: 5s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/launchkit/live-total.mp4
- Poster: https://agentframes.ai/media/launchkit/live-total.jpg
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Launchkit pack. Add a `liveTotal` beat to plan.json on a `ion` canvas with slots `eyebrow`, `title`, `checkout` and `metric` 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":32} | Pay once |
| `title` | string | title | {"type":"string","minLength":1,"maxLength":40} | One price. No seats. |
| `checkout` | string | checkout | {"type":"object","properties":{"type":{"type":"string","enum":["checkout"]},"currency":{"type":"string","minLength":1,"maxLength":3},"button":{"type":"string","minLength":1,"maxLength":12},"items":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":26},"amount":{"type":"number","minimum":0,"maximum":999999}},"required":["label","amount"]}}},"required":["type","currency","button","items"]} | {"type":"checkout","currency":"$","button":"Pay","items":[{"label":"Driftly Pro, lifetime","amount":149},{"label":"Extra inbox","amount":29},{"label":"VAT 20%","amount":35.6}]} |
| `metric` | string | metric | {"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":26},"value":{"type":"number","minimum":0,"maximum":9999999},"prefix":{"type":"string","minLength":0,"maxLength":3},"suffix":{"type":"string","minLength":0,"maxLength":4},"bars":{"type":"array","minItems":4,"maxItems":12,"items":{"type":"number","minimum":0,"maximum":1000000000}}},"required":["label","value","bars"]} | {"label":"Hours saved","value":62,"suffix":" h","bars":[12,18,22,30,41,48,55,62]} |

## What your agent can change

Live total + metric · pilot role: Data chart. Checkout line items add and the total ticks to their exact sum; a metric counts up over honest bars.

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-launchkit-runtime`. Mount with a unique host id, `data-composition-id="af-launchkit-live-total-16x9"`, `data-composition-src="compositions/af-launchkit-live-total-16x9.html"` and `data-variable-values` (JSON object). The starter projects already contain everything.

### Slots (content)
- `eyebrow`: {"type":"string","minLength":0,"maxLength":32}
- `title`: {"type":"string","minLength":1,"maxLength":40}
- `checkout`: JSON string; {"type":"object","properties":{"type":{"type":"string","enum":["checkout"]},"currency":{"type":"string","minLength":1,"maxLength":3},"button":{"type":"string","minLength":1,"maxLength":12},"items":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":26},"amount":{"type":"number","minimum":0,"maximum":999999}},"required":["label","amount"]}}},"required":["type","currency","button","items"]}
- `metric`: JSON string; {"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":26},"value":{"type":"number","minimum":0,"maximum":9999999},"prefix":{"type":"string","minLength":0,"maxLength":3},"suffix":{"type":"string","minLength":0,"maxLength":4},"bars":{"type":"array","minItems":4,"maxItems":12,"items":{"type":"number","minimum":0,"maximum":1000000000}}},"required":["label","value","bars"]}

Nested slots are JSON strings inside `data-variable-values`. UI blocks (`panel`, `checkout`) use the ui.json block shapes in docs/UI-SCHEMA.md; `{"type":"shot","src":"data:image/png;base64,..."}` puts a screenshot in the window instead of rebuilt UI.

### Style
`brandName` (1-28), `logo` (empty → monogram app icon, or an inline base64 image), `look` (midnight | paper), `colourway` (midnight: ion, aurora, ember · paper: signal, cobalt, moss), `accent` (empty or #RRGGBB, overrides the colourway accent), `timeOffset` (seconds; Paper's corner timecode continues across a film).

Headline syntax: `\n` breaks a line. `*word*` is the accent (serif italic in Paper, accent colour in Midnight). A Midnight headline with two lines and no `*accent*` colours its last line (two-tone).

### Limits and errors
Out-of-range input stops the block with a message on `data-launchkit-error` and in the console (for example "slots.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, NOTICE and TRADEMARKS.md.

## FAQ

### What can my AI agent change in Live total + metric?

Your agent fills the `eyebrow`, `title`, `checkout` and `metric` 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 Launchkit look.

### Which aspect ratios does Live total + metric support?

Live total + metric is designed natively for 16:9, 9:16, 4:5 and 1:1. A typical beat lasts 5s.

### How do I get Live total + metric?

Live total + metric is included in the Launchkit 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 Launchkit

- [Growth line](https://agentframes.ai/elements/launchkit/mrr-line.md): A growth line draws over a zero baseline; the end dot pulses once and the annotation lands on the final value.
- [Trusted by](https://agentframes.ai/elements/launchkit/trusted-by.md): The headline count climbs to its value, then the logo cloud fades in row by row (cleared logos or text names).
- [Review stars](https://agentframes.ai/elements/launchkit/review-stars.md): The rating counts up while five stars fill left to right (partial stars are exact) and the laurels draw.
- [Usage donut](https://agentframes.ai/elements/launchkit/usage-donut.md): Segments sweep in order and their percentages count up; shares are computed from the values and always total 100%.

## Community

Coming soon.
