# Before / After Stat: Stat & chart element for AI agents

> Big-number stat on a glass panel: number counts up, before/after bars fill (after in teal)

Canonical page: https://agentframes.ai/elements/frost/stat-compare/
Markdown: https://agentframes.ai/elements/frost/stat-compare.md

## Overview

- Name: Before / After Stat (`statCompare`), an element: one HyperFrames block per size
- Part of: the [Frost](https://agentframes.ai/packs/frost.md) pack (42 of 45). Available only through the All-access subscription.
- Category: Stat & chart
- Purpose: Big-number stat on a glass panel: number counts up, before/after bars fill (after in teal)
- Pack: [Frost](https://agentframes.ai/packs/frost.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: 9:16 (native), 16:9 (stage-fit)
- Canvases: works on night glass (`n`), frost haze (hero) (`f`), mist white (`m`); avoid none
- Typical duration: 4s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/frost/stat-compare.mp4
- Poster: https://agentframes.ai/media/frost/stat-compare.jpg
- Native 9:16 preview (watermarked): https://agentframes.ai/media/frost/stat-compare-native.mp4
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Frost pack. Add a `statCompare` beat to plan.json on a `n` canvas with slots `eyebrow`, `value`, `unit`, `before` and `after` from my script. Then run validate → build → qa and show me qa/contact.jpg.
```

## Variables

| Variable | Type | Label | Description | Default |
|---|---|---|---|---|
| `eyebrow` | string | Eyebrow | Plain text. | Time saved every week |
| `value` | number | Value | Plain text. | 12 |
| `unit` | string | Unit | Plain text. | hrs |
| `before` | json | Before | JSON array; keep the same shape as the default. | ["Before",15,"15 hrs"] |
| `after` | json | After | JSON array; keep the same shape as the default. | ["After",3,"3 hrs"] |

## What your agent can change

### Surface

Big-number stat on a glass panel: number counts up, before/after bars fill (after in teal). Category: `stat`. Canvases: ok `n, f, m`. Typical 4s; settles at 2s.

### Editable (fill through plan.json `slots`)

- `eyebrow` (string). Plain text.
- `value` (number) **EXAMPLE DATA: replace or get client sign-off**. Plain text.
- `unit` (string). Plain text.
- `before` (json) **EXAMPLE DATA: replace or get client sign-off**. JSON array; keep the same shape as the default.
- `after` (json) **EXAMPLE DATA: replace or get client sign-off**. JSON array; keep the same shape as the default.

Optional style/layout overrides: `dark`, `y`. Use them only to fix fit, never to change the brand.

### Protected

Do not change the motion, timing, easing, bounce, the palette roles (colours come from frame.md → tokens.css), fonts, or the element's internal layout. Keep copy close to the default length (±25%) so it fits.

### Safe editing

Set values in the beat's `slots` in plan.json, run `tools/validate.mjs`, rebuild, and check `qa/contact.jpg`. Never hand-edit the generated index.html or this element's code for a single video.

## FAQ

### What can my AI agent change in Before / After Stat?

Your agent fills the `eyebrow`, `value`, `unit`, `before` and `after` slots through plan.json. Motion, timing, palette, fonts and the internal layout are protected, so the result keeps the Frost look.

### Which aspect ratios does Before / After Stat support?

Before / After Stat is designed natively for 9:16 and stage-fits into 16:9. A typical beat lasts 4s.

### How do I get Before / After Stat?

Before / After Stat is included in the Frost pack, which is part of the AgentFrames All-access subscription along with 44 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 Frost

- [Bar Chart](https://agentframes.ai/elements/frost/bar-chart.md): Bar chart: glass panel, seven glass columns rise, the best day fills teal with its value and a sparkle
- [Number Counter](https://agentframes.ai/elements/frost/number-counter.md): Number counter: each digit rolls up in its own glass tile, change pill with an arrow below
- [Progress Ring](https://agentframes.ai/elements/frost/progress-ring.md): Progress ring: glass disc, teal arc draws to the value while the % counts up, sparkle rides the arc end
- [Animated Word](https://agentframes.ai/elements/frost/animated-word.md): Animated word: one big word whose letters defrost one by one from alternating heights, sparkle on the last letter

## Community

Coming soon.
