20 of 50 in the Squeak pack

Before and After: Diagram element for AI agents

The same thing then and now: a red BEFORE side and a green AFTER side, each with an icon and a line, joined by a thick green arrow (across in 16:9, down in the others)..

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

Watermarked preview. The Squeak pack includes all 50 elements, clean and editable, in every size.

Paste this into Claude Code

Use the AgentFrames Squeak pack. Add a `beforeAfter` beat to plan.json on a `k` canvas with slots `title`, `before` and `after` 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
titlestringtitle: {"type":"string","minLength":1,"maxLength":50}.One habit, _two months_
beforestringbefore: JSON string. {"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":12},"text":{"type":"string","minLength":1,"maxLength":60},"icon":{"type":"string","enum":["person","people","handshake","bubble","megaphone","money","coins","bag","envelope","search","laptop","heart","star","trophy","clock","chart","bulb","gift","link","phone","house","store","piggy","calendar","target","gear","lock","book","rocket","check","cross"]}},"required":["label","text","icon"]}.{"label":"Before","text":"Leads from paid ads only","icon":"megaphone"}
afterstringafter: JSON string. {"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":12},"text":{"type":"string","minLength":1,"maxLength":60},"icon":{"type":"string","enum":["person","people","handshake","bubble","megaphone","money","coins","bag","envelope","search","laptop","heart","star","trophy","clock","chart","bulb","gift","link","phone","house","store","piggy","calendar","target","gear","lock","book","rocket","check","cross"]}},"required":["label","text","icon"]}.{"label":"After","text":"One in three leads is a referral","icon":"people"}

What your agent can change

Before and After. Native 1920×1080, 8.5s at 30fps.

The same thing then and now: a red BEFORE side and a green AFTER side, each with an icon and a line, joined by a thick green arrow (across in 16:9, down in the others).

Motion. Before label, icon and line; the arrow; after label, icon (in green) and line. Why it moves. change: the arrow between two pictures is the change itself.

Mount

Copy every manifest file into your project (plus af-squeak-runtime). Mount with a unique host id, data-composition-id="af-squeak-before-after-16x9", data-composition-src="compositions/af-squeak-before-after-16x9.html", data-duration="8.5" and data-variable-values. Use the variant whose size matches your project (16x9, 9x16, 4x5, 1x1): 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).

  • title: {"type":"string","minLength":1,"maxLength":50}
  • before (required): {"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":12},"text":{"type":"string","minLength":1,"maxLength":60},"icon":{"type":"string","enum":["person","people","handshake","bubble","megaphone","money","coins","bag","envelope","search","laptop","heart","star","trophy","clock","chart","bulb","gift","link","phone","house","store","piggy","calendar","target","gear","lock","book","rocket","check","cross"]}},"required":["label","text","icon"]}
  • after (required): {"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":12},"text":{"type":"string","minLength":1,"maxLength":60},"icon":{"type":"string","enum":["person","people","handshake","bubble","megaphone","money","coins","bag","envelope","search","laptop","heart","star","trophy","clock","chart","bulb","gift","link","phone","house","store","piggy","calendar","target","gear","lock","book","rocket","check","cross"]}},"required":["label","text","icon"]}
  • title: optional heading, Markup: plain = black, _words_ = key green (underlined), *words* = blue; "|" breaks a line. Titles are written in capitals.
  • icon: one of the marker icons.

Style: colourway (classic, glass, grid), accent (optional hex for the key marker), footer, sound (on, off), volume (0-1, default 0.8), enter and exit (pan, hold or flip).

Sound

Every stroke makes its marker sound (writing scratches, line strokes, the circle squeak, the tick, taps), booked from the same schedule that draws it, so edited content stays in sync. The clips come from assets/af-squeak/sfx/ (synthesised, no recordings). sound: "off" makes the block silent; volume scales every clip.

Timing

8.5s. Everything has been drawn by 5.1s (60%), then the scene holds for reading (the board's gloss drifts, the writing stays still). Longer content is written faster (up to 2.5x); content that still would not finish stops the block with a message. The board slides in from the right over the first 0.62 s and, with exit "pan", slides out to the left over the last 0.62 s at the same speed, so scenes laid end to end read as one long board.

Example

``json { "title": "One habit, _two months_", "before": "{\"label\":\"Before\",\"text\":\"Leads from paid ads only\",\"icon\":\"megaphone\"}", "after": "{\"label\":\"After\",\"text\":\"One in three leads is a referral\",\"icon\":\"people\"}" } ``

FAQ

What can my AI agent change in Before and After?

Your agent fills the title, before and after 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 Squeak look.

Which aspect ratios does Before and After support?

Before and After is designed natively for 16:9, 9:16, 4:5 and 1:1. A typical beat lasts 8.5s.

How do I get Before and After?

Before and After is included in the Squeak 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.

This is 1 of 50

Get the full Squeak pack

Before and After comes as part of Squeak: 50 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) · 61s · made entirely with this pack

More in Squeak

See all 50 elements in Squeak →