# Legend (overlay): Label & callout element for AI agents

> A small key in a corner: a hand box with a hatched swatch per marker colour and its meaning.

Canonical page: https://agentframes.ai/elements/squeak/legend/
Markdown: https://agentframes.ai/elements/squeak/legend.md

## Overview

- Name: Legend (overlay) (`legend`), an element: one HyperFrames block per size
- Part of: the [Squeak](https://agentframes.ai/packs/squeak.md) pack (30 of 50). Available only through the All-access subscription.
- Category: Label & callout
- Purpose: A small key in a corner: a hand box with a hatched swatch per marker colour and its meaning.
- Pack: [Squeak](https://agentframes.ai/packs/squeak.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 none; avoid none
- Typical duration: 4.5s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/squeak/legend.mp4
- Poster: https://agentframes.ai/media/squeak/legend.jpg
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Squeak pack. Add a `legend` beat to plan.json on a `k` canvas with slots `corner` and `items` from my script. Then run validate → build → qa and show me qa/contact.jpg.
```

## Variables

| Variable | Type | Label | Description | Default |
|---|---|---|---|---|
| `corner` | enum | corner | {"type":"string","enum":["tl","tr","bl","br"]} | tr |
| `items` | string | items | JSON string. {"type":"array","minItems":2,"maxItems":4,"items":{"type":"object","properties":{"mark":{"type":"string","enum":["ink","key","alt","warn"]},"label":{"type":"string","minLength":1,"maxLength":18}},"required":["mark","label"]}} | [{"mark":"key","label":"Referral"},{"mark":"ink","label":"Other"}] |

## What your agent can change

**Legend (overlay)**. Native 1920×1080, 4.5s at 30fps. Transparent overlay: mount it on a track above a host scene.

A small key in a corner: a hand box with a hatched swatch per marker colour and its meaning.

**Motion.** Box, then swatch and label for each row; fades over the last 0.4 s.
**Why it moves.** attention: tells the viewer what each colour means without stopping the diagram.

### Mount

Copy every manifest file into your project (plus `af-squeak-runtime`). Mount with a unique host id, `data-composition-id="af-squeak-legend-16x9"`,
`data-composition-src="compositions/af-squeak-legend-16x9.html"`, `data-duration="4.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).

- `corner`: {"type":"string","enum":["tl","tr","bl","br"]}
- `items` (required): {"type":"array","minItems":2,"maxItems":4,"items":{"type":"object","properties":{"mark":{"type":"string","enum":["ink","key","alt","warn"]},"label":{"type":"string","minLength":1,"maxLength":18}},"required":["mark","label"]}}

- Mount on a track above the host scene with `style="z-index:5"`.

Style: `colourway`, `accent`, `sound` (on, off), `volume` (0-1).

### 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

4.5s. Everything has been drawn by 2.7s (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.

### Example

```json
{
  "corner": "tr",
  "items": "[{\"mark\":\"key\",\"label\":\"Referral\"},{\"mark\":\"ink\",\"label\":\"Other\"}]"
}
```

## FAQ

### What can my AI agent change in Legend (overlay)?

Your agent fills the `corner` and `items` 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 Legend (overlay) support?

Legend (overlay) is designed natively for 16:9, 9:16, 4:5 and 1:1. A typical beat lasts 4.5s.

### How do I get Legend (overlay)?

Legend (overlay) 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.

## More in Squeak

- [Pointer Callout: Circle and Arrow (overlay)](https://agentframes.ai/elements/squeak/pointer-callout.md): Points at one thing in the scene underneath: a green loop circles the target, a green arrow is drawn to it from a note, and the note is written beside it.
- [Key Phrase Mark (overlay)](https://agentframes.ai/elements/squeak/key-phrase.md): Marks a phrase already on screen: a green underline, double underline, circle or box at a target box, with an optional exclamation mark.
- [Caution (overlay)](https://agentframes.ai/elements/squeak/caution.md): A warning: a red triangle with "!" drawn and the warning written in red, at the top or bottom of the frame.
- [Aside (overlay)](https://agentframes.ai/elements/squeak/aside.md): A small handwritten aside in a corner, in blue, with a curly arrow towards the middle of the frame.

## Community

Coming soon.
