---
name: videobana-compositions
description: "Complete reference for Videobana compositions: the `compose` scene, a board built from many small components (titles, cards, lists, tables, counters, charts, donuts, gauges, pictures, icons, drawings, diagram nodes with links, highlights and a clicking pointer, buttons, toggles, windows and phones that hold other components, backdrops and confetti). Covers placing components by percent of the board, groups and flows (row, column, grid, stack), board units for every aspect ratio and phone overrides, timing to the narration with `line1`, `line2` ..., the enter, loop and exit presets, every component with its fields and an example, the fields all components share, limits, checks and whole-scene recipes. Use it when writing or editing a `compose` scene: a dashboard, an infographic, a UI mock-up, an architecture diagram or any layout of many parts."
---

# Compositions

Build one scene out of many small components: put each where you want it, give it a value, a size and a moment to come in, and tie them together with connectors. 58 kinds of component, one board, every aspect ratio.

A `compose` scene is a board and a list of `components`. Each component says what it is (`type`), what it shows (its own fields: a `value`, a `label`, `rows`), where it sits, how big it is and when it comes in. Groups, panels, windows and phones hold other components, so any layout can be built by nesting. The narration drives the timing: `lines` are the spoken passages, and a component appears when the line it is tied to starts. Everything is data, so a person or an AI can write it.

The guide with playable previews is at https://www.bana.video/docs/compose, and the scene itself is in the scene reference at https://www.bana.video/docs/scenes#compose (skill `videobana-scenes`). The demos at https://www.bana.video/demos have a shelf of compositions to open in the editor: a dashboard, an architecture diagram, an app tour for a phone, a training plan, a party and a weekly report.

## A complete compose scene

A board you build from many small components, each with a place, a size, a moment to come in and a way of moving: titles, cards, bullet lists, numbers that count up, bar and line charts, donuts, gauges, tables, timelines, code, windows and phones with things inside, diagrams with nodes and connectors, buttons, toggles, avatars, a pointer that clicks, sparkles, confetti and more (see the component list). Place a component with `x` and `y` (percent of the board), or leave them out and let it flow into a row, a column or a grid with a `group`. Nest containers (`group`, `panel`, `window`, `phone`) to make any layout. Time each component to the narration with `at: "line2"`, or leave `at` out and they come in one after another. Sizes are in units of the video's width, so one composition fits every aspect ratio; `phone` overrides rearrange it for square and tall frames. Use it for what no other scene shows: a dashboard, a product tour, an architecture diagram, an infographic, a UI mockup, a scene that mixes a chart, a list and a picture.

**Narration.** Optional `lead`, then one passage per entry of `lines`. Components can be timed to each passage: the moment line 2 is spoken is `at: "line2"` (also `exitAt`, `press`, `flipAt` and the stops of a `pointer`).

```json
{
  "kind": "compose",
  "heading": "One board, many parts",
  "components": [
    {
      "type": "glow",
      "tone": "violet",
      "x": 18,
      "y": 30,
      "w": 40,
      "h": 70
    },
    {
      "type": "group",
      "direction": "row",
      "gap": 2.4,
      "children": [
        {
          "type": "card",
          "icon": "bolt",
          "title": "Fast",
          "text": "Starts in seconds."
        },
        {
          "type": "card",
          "icon": "shield",
          "title": "Safe",
          "text": "Private by design.",
          "tone": "emerald"
        },
        {
          "type": "card",
          "icon": "sparkles",
          "title": "Simple",
          "text": "One short file.",
          "tone": "amber"
        }
      ]
    },
    {
      "type": "badge",
      "text": "New",
      "icon": "✨",
      "tone": "amber",
      "solid": true,
      "x": 50,
      "y": 90,
      "at": "line3"
    }
  ],
  "lines": [
    {
      "say": "Every part is a small component with a place and a moment."
    },
    {
      "say": "Put them in a row, a column or a grid."
    },
    {
      "say": "And bring each one in exactly when you talk about it."
    }
  ]
}
```

A scene from the ready-made video "Launch week at a glance":

```json
{
  "kind": "compose",
  "heading": "Launch week at a glance",
  "components": [
    {
      "type": "pattern",
      "kind": "dots",
      "opacity": 0.45
    },
    {
      "type": "glow",
      "tone": "violet",
      "x": 14,
      "y": 22,
      "w": 46,
      "h": 70
    },
    {
      "type": "glow",
      "tone": "sky",
      "x": 90,
      "y": 82,
      "w": 40,
      "h": 60
    },
    {
      "type": "group",
      "direction": "column",
      "gap": 1.8,
      "w": "100%",
      "children": [
        {
          "type": "group",
          "direction": "row",
          "gap": 1.6,
          "align": "stretch",
          "at": "line1",
          "phone": {
            "direction": "grid",
            "columns": 2,
            "gap": 1.4
          },
          "children": [
            {
              "type": "stat",
              "value": 48200,
              "label": "Visitors",
              "change": 12.4,
              "icon": "users",
              "tone": "violet"
            },
            {
              "type": "stat",
              "value": 3.8,
              "decimals": 1,
              "suffix": "%",
              "label": "Conversion",
              "change": -0.6,
              "tone": "sky"
            },
            {
              "type": "stat",
              "value": 12900,
              "prefix": "$",
              "label": "Revenue",
              "change": 8.1,
              "tone": "emerald"
            },
            {
              "type": "stat",
              "value": 4.6,
              "decimals": 1,
              "label": "Rating",
              "icon": "star",
              "tone": "amber"
            }
          ]
        },
        {
          "type": "group",
          "direction": "row",
          "gap": 1.6,
          "align": "stretch",
          "phone": {
            "direction": "column"
          },
          "children": [
            {
              "type": "panel",
              "title": "Visitors per day",
              "icon": "chart",
              "at": "line2",
              "children": [
                {
                  "type": "chart",
                  "series": [
                    {
                      "name": "Visitors",
                      "values": [
                        4,
                        9,
                        7,
                        15,
                        22,
                        19,
                        28
                      ],
                      "tone": "violet"
                    },
                    {
                      "name": "Signups",
                      "values": [
                        2,
                        3,
                        4,
                        6,
                        9,
                        8,
                        14
                      ],
                      "tone": "emerald"
                    }
                  ],
                  "labels": [
                    "Mon",
                    "Tue",
                    "Wed",
                    "Thu",
                    "Fri",
                    "Sat",
                    "Sun"
                  ],
                  "area": true,
                  "dots": true,
                  "w": 36,
                  "h": 13
                }
              ]
            },
            {
              "type": "panel",
              "title": "Where they came from",
              "at": "line3",
              "children": [
                {
                  "type": "donut",
                  "data": [
                    {
                      "label": "Search",
                      "value": 46
                    },
                    {
                      "label": "Social",
                      "value": 28
                    },
                    {
                      "label": "Direct",
                      "value": 18
                    },
                    {
                      "label": "Other",
                      "value": 8
                    }
                  ],
                  "centre": "total",
                  "legend": true,
                  "w": 20
                }
              ]
            },
            {
              "type": "panel",
              "title": "Goals",
              "at": "line4",
              "children": [
                {
                  "type": "progress",
                  "value": 82,
                  "label": "Signups",
                  "w": 18
                },
                {
                  "type": "progress",
                  "value": 54,
                  "label": "Trials",
                  "tone": "sky",
                  "w": 18
                },
                {
                  "type": "progress",
                  "value": 31,
                  "label": "Paid plans",
                  "tone": "amber",
                  "w": 18
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "lines": [
    {
      "say": "Forty-eight thousand people visited this week, twelve percent more than before."
    },
    {
      "say": "Visits climbed almost every day, and peaked on Sunday."
    },
    {
      "say": "Search brought nearly half of them, with social close behind."
    },
    {
      "say": "And all three goals are moving in the right direction."
    }
  ]
}
```

## The fields of the scene

Besides `"kind": "compose"` and the fields every scene has (listed in `videobana-scenes`). Each entry of `components` is one of the components below, picked by its `type`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `heading` | `string` | no | Scene heading shown at the top. Limits: 1–60 characters. |
| `components` | `any[]` | yes | The components on the board, from the back to the front, up to 60 (120 counting everything inside containers). Each has a `type`. Limits: 1–60 items. |
| `flow` | `object` | no | How the components that have no `x` or `y` are laid out on the board. Default: a column, in the middle. |
| `flow.direction` | `enum` | no | `row` and `column` line the children up (and wrap on to a new line when a row is full), `grid` puts them in `columns` columns, `stack` lays them on top of each other. Allowed: `row`, `column`, `grid`, `stack`. |
| `flow.gap` | `number` | no | Space between the children, in units. Limits: 0–20. |
| `flow.align` | `enum` | no | How the children line up across the direction of the flow. Default `center`. Allowed: `start`, `center`, `end`, `stretch`. |
| `flow.justify` | `enum` | no | How the children are spread along the direction of the flow. Default `center`. Allowed: `start`, `center`, `end`, `between`, `around`. |
| `flow.columns` | `integer` | no | Columns of a `grid`. Default 2. Limits: 1–8. |
| `flow.wrap` | `boolean` | no | `false` keeps a `row` on one line. Default `true`. |
| `flow.phone` | `object` | no | The same fields, for phone-shaped frames. |
| `flow.phone.direction` | `enum` | no | `row` and `column` line the children up (and wrap on to a new line when a row is full), `grid` puts them in `columns` columns, `stack` lays them on top of each other. Allowed: `row`, `column`, `grid`, `stack`. |
| `flow.phone.gap` | `number` | no | Space between the children, in units. Limits: 0–20. |
| `flow.phone.align` | `enum` | no | How the children line up across the direction of the flow. Default `center`. Allowed: `start`, `center`, `end`, `stretch`. |
| `flow.phone.justify` | `enum` | no | How the children are spread along the direction of the flow. Default `center`. Allowed: `start`, `center`, `end`, `between`, `around`. |
| `flow.phone.columns` | `integer` | no | Columns of a `grid`. Default 2. Limits: 1–8. |
| `flow.phone.wrap` | `boolean` | no | `false` keeps a `row` on one line. Default `true`. |
| `lines` | `object[]` | yes | The narration, one passage at a time. Their moments are `line1`, `line2` ... and what each component's `at` can point at. Limits: 1–12 items. |
| `lines[].say` | `string` | yes | The narration for this item. It is spoken, and shown as the caption. With the premium voice, a tag such as `<sigh>`, `<laugh>` or `<short pause>` is performed at that spot and is not shown. Limits: 1–500 characters. |
| `lead` | `string` | no | Narration before the first item appears. Limits: 1–500 characters. |
| `outro` | `string` | no | Narration after the last item. Limits: 1–500 characters. |

## The board and its units

Sizes are written in **units**: one unit is one percent of the width of a landscape video. A component keeps its proportions in every shape of frame, because the board and everything on it are measured in the same unit. Square and tall videos have a board with fewer units than a landscape one, so text stays easy to read on a phone:

| aspect | Layout | Board (units), about |
| --- | --- | --- |
| `16:9` | Landscape | 94 × 39 |
| `4:3` | Landscape | 81 × 48 |
| `1:1` | Phone | 60 × 47 |
| `4:5` | Phone | 46 × 46 |
| `3:4` | Phone | 46 × 51 |
| `9:16` | Phone | 39 × 61 |

The sizes are those of a scene with a `heading`; without one the board is a few units taller. Plan for the shape the video will have: a row of four cards fits a landscape board and is too wide for a phone, where `flow` wraps it into two rows and shrinks it to fit. Phone-shaped frames (1:1, 4:5, 3:4, 9:16) have a board only about half as wide in units.

## Placing components

A component with an `x` or a `y` sits at a place on the board: both are **percent of the board**, from the top left corner (0 is the left or top edge, 50 the middle, 100 the right or bottom edge), and the place is the component's centre unless `anchor` says which point of the component sits there (`center`, `top`, `bottom`, `left`, `right`, `top-left`, `top-right`, `bottom-left`, `bottom-right`). A component with neither is not placed: the **flow** of what holds it places it, and the board lines such components up in a column in the middle.

```json
[
  {
    "type": "card",
    "icon": "🧭",
    "title": "Plan",
    "text": "Decide what to say.",
    "x": 25,
    "y": 45,
    "w": 24
  },
  {
    "type": "badge",
    "text": "New",
    "icon": "✨",
    "solid": true,
    "tone": "amber",
    "x": 96,
    "y": 6,
    "anchor": "top-right"
  }
]
```

- `w` and `h` are units, or a percentage of what holds the component (`"50%"`). Every component has a width of its own to start from, and a height that follows its content.
- `scale` makes the whole component, text included, bigger or smaller; `rotate` turns it; `opacity` makes it see-through.
- Components are drawn in the order of the list, so a later one is in front. `z` overrides that. Backdrops (`pattern`, `glow`, `shape`) sit behind everything, `link`s between the backdrops and the rest, and `highlight`, `pointer`, `confetti` and `sparkles` in front of everything.
- A `glow` or `shape` on the board is placed in the middle unless it has an `x` and a `y`; a `pattern`, `sparkles` or `confetti` fills the board unless it has a size. Inside a container they take part in its flow like anything else.
- What has an `x` and a `y` is never shrunk, so keep it inside the board. A component may be put off the board (up to 300% away), to slide in from the edge.

## Layouts with groups

A `group` is an invisible container: it lays out its `children` as a row, a column, a grid or a stack, and moves, scales and fades them together. `panel`, `window` and `phone` are containers with a look of their own. Containers can hold containers, down to 4 levels, with up to 24 children each. The board itself takes the same fields, in the scene's `flow`, for the components that are not placed.

| direction | How the children lie |
| --- | --- |
| `row` | Side by side. When the row is full the rest wraps on to a new line (set `wrap` to `false` to keep one line). |
| `column` | One under the other. |
| `grid` | In `columns` columns (2 unless you say). |
| `stack` | On top of each other, all in the same place: for layers, such as a picture with a badge on it. |

The flow fields of a container (the scene's `flow` takes the same, with `phone` holding only flow fields):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `direction` | `enum` | no | `row` and `column` line the children up (and wrap on to a new line when a row is full), `grid` puts them in `columns` columns, `stack` lays them on top of each other. Allowed: `row`, `column`, `grid`, `stack`. |
| `gap` | `number` | no | Space between the children, in units. Limits: 0–20. |
| `align` | `enum` | no | How the children line up across the direction of the flow. Default `center`. Allowed: `start`, `center`, `end`, `stretch`. |
| `justify` | `enum` | no | How the children are spread along the direction of the flow. Default `center`. Allowed: `start`, `center`, `end`, `between`, `around`. |
| `columns` | `integer` | no | Columns of a `grid`. Default 2. Limits: 1–8. |
| `wrap` | `boolean` | no | `false` keeps a `row` on one line. Default `true`. |

```json
[
  {
    "type": "group",
    "direction": "column",
    "gap": 2,
    "children": [
      {
        "type": "title",
        "text": "Three steps",
        "size": 4
      },
      {
        "type": "group",
        "direction": "row",
        "gap": 2,
        "children": [
          {
            "type": "card",
            "icon": "✏️",
            "title": "Write",
            "text": "Say it in a few lines."
          },
          {
            "type": "card",
            "icon": "👀",
            "title": "Preview",
            "text": "See it play at once.",
            "tone": "sky"
          },
          {
            "type": "card",
            "icon": "🚀",
            "title": "Publish",
            "text": "Share it anywhere.",
            "tone": "emerald"
          }
        ]
      }
    ]
  }
]
```

- A group is only as wide as its content, unless it has a `w` (`"100%"` spans what holds it). Use `spacer` and `divider` for room and rules between children.
- What flows is **shrunk to fit** the board, down to about a third, so a column that is too tall still shows. A width in percent cannot shrink with it: give the parts of a crowded flow widths in units.

## Timing and movement

`at` says when a component comes in. It is a number of seconds from the start of the scene, or a narration moment: `line1` is when the first entry of `lines` starts to be spoken, `line2` the second, and so on. Tying components to lines keeps the picture in step with the voice, whatever the speed of the narrator. The same moments work for `exitAt`, a button's `press`, a toggle's `flipAt` and the stops of a `pointer`. A `lineN` the scene does not have is an error.

```json
{
  "kind": "compose",
  "heading": "Timing",
  "components": [
    {
      "type": "title",
      "text": "Launch week",
      "size": 5,
      "enter": "rise"
    },
    {
      "type": "chart",
      "series": [
        {
          "name": "Visitors",
          "values": [
            12,
            18,
            15,
            26,
            31,
            38
          ],
          "tone": "sky"
        }
      ],
      "labels": [
        "Mon",
        "Tue",
        "Wed",
        "Thu",
        "Fri",
        "Sat"
      ],
      "area": true,
      "w": 50,
      "h": 14,
      "at": "line2",
      "enter": "wipe",
      "build": 2.5
    },
    {
      "type": "stamp",
      "text": "Record!",
      "tone": "emerald",
      "size": 3,
      "at": "line3",
      "exit": "shrink",
      "exitAt": "line4"
    }
  ],
  "lines": [
    {
      "say": "A composition starts with whatever you put first."
    },
    {
      "say": "The chart arrives when the second line starts."
    },
    {
      "say": "The stamp slams on with the third."
    },
    {
      "say": "And leaves with the fourth."
    }
  ]
}
```

- Without `at`, components on the board come in one after another: the first 0.3 seconds in, the next 0.25 seconds after it. What is inside a container comes in 0.25 seconds after the container, each child 0.18 seconds after the one before. A connector comes in 0.35 seconds after the last component it points at.
- Backdrops (`pattern`, `glow`, `shape`) without `at` are there from the start (or come in with their container) and do not take a turn. A `link`, `highlight` or `pointer` without `at` comes in just after what it points at, and leaves when that leaves (or when its container does).
- The inside of a component builds itself as it comes in: bars grow, numbers count up, lists appear row by row, text types out. `build` sets how many seconds that takes (by default longer for longer lists and texts). A button builds its press at `press`, and a toggle flips at `flipAt` (or a moment after it comes in).
- `delay` adds a wait before `enter`, `duration` sets how long `enter` and `exit` take, and `loop` gives a movement that repeats while the component is on screen. A component leaves at `exitAt`, with its `exit` (default `fade`); `exit` without `exitAt` does nothing (a warning), and an `exitAt` that is not later than the moment it comes in is an error.
- Nothing uses a browser transition: every frame is a function of the time, so the video plays, scrubs and exports the same way.

### enter

| enter | What it does | Seconds (default) |
| --- | --- | --- |
| `fade` | Fades in. The default. | 0.6 |
| `rise` | Floats up a little while fading in. | 0.65 |
| `drop` | Falls from above and bounces once. | 0.85 |
| `slide-left` | Slides in from the left. | 0.65 |
| `slide-right` | Slides in from the right. | 0.65 |
| `pop` | Grows from a little smaller, with a small overshoot. | 0.55 |
| `zoom` | Shrinks into place from a larger size. | 0.7 |
| `spin` | Turns half a circle while it grows. | 0.8 |
| `flip` | Tips up from edge-on, like a flap turning over. | 0.7 |
| `blur` | Comes into focus. | 0.7 |
| `wipe` | Is uncovered from left to right, like a curtain drawn back. | 0.7 |
| `grow` | Grows from nothing in its own middle, with a small overshoot. | 0.7 |
| `draw` | A `link`, `highlight` or `divider` draws its own line; everything else is uncovered like `wipe`. | 0.9 |
| `none` | Is there at once, with no movement. | 0 |

Without `enter` a component comes in with `fade`, except these kinds, which have a way in of their own:

| Default enter | Components |
| --- | --- |
| `draw` | `divider`, `link`, `highlight` |
| `none` | `group`, `confetti` |
| `rise` | `title`, `text`, `quote`, `card`, `callout`, `panel`, `window`, `phone` |
| `pop` | `badge`, `bubble`, `avatar`, `avatars`, `icon`, `node`, `marker`, `button` |
| `drop` | `note` |
| `zoom` | `stamp` |
| `slide-right` | `toast` |

### loop

| loop | What it does |
| --- | --- |
| `float` | Drifts up and down, slowly. |
| `pulse` | Swells and shrinks, like a heartbeat. |
| `spin` | Turns round and round. |
| `sway` | Rocks from side to side, hanging from its top. |
| `bounce` | Hops up and down. |
| `blink` | Fades down and up. |
| `wiggle` | Shakes a little. |
| `breathe` | Swells and shrinks, very slowly. |

### exit

| exit | What it does | Seconds (default) |
| --- | --- | --- |
| `fade` | Fades out. The default. | 0.5 |
| `shrink` | Shrinks to half while it fades. | 0.5 |
| `slide-left` | Slides out to the left. | 0.5 |
| `slide-right` | Slides out to the right. | 0.5 |
| `slide-up` | Floats up and away. | 0.5 |
| `slide-down` | Sinks down and away. | 0.5 |
| `blur` | Goes out of focus. | 0.5 |
| `zoom` | Swells while it fades. | 0.5 |

## Connectors and pointers

Give components an `id` (unique in the scene), and three kinds of component can point at them. A `link` joins two components (`from` and `to`) with a line that draws itself; a `highlight` draws a frame, a circle, an underline or a bracket around its `target`; a `pointer` glides from one stop of its `path` to the next and clicks. They are measured from the drawn components, so they follow them when they move, or when the frame changes shape.

- An end can name a side, `api.right` (`top`, `right`, `bottom`, `left`, `center`). Without a side the line joins the sides that face each other. It can also be a point of the board, `[x, y]` in percent.
- A `label` on a link sits in the middle of the line, with the line cut away behind it so it stays easy to read. `flow` makes dashes run along the line, and `shape` is `curve` (the default), `straight` or `elbow`.
- Pointing at a name no component has, or at the component itself, is an error.

### A diagram with connectors

Give the nodes an `id`, then join them with `link`s and point at one with a `highlight`. The connectors draw themselves just after what they join, and follow it if it moves.

```json
{
  "kind": "compose",
  "heading": "How a request travels",
  "components": [
    {
      "type": "node",
      "id": "app",
      "label": "App",
      "icon": "📱",
      "x": 14,
      "y": 55,
      "tone": "sky"
    },
    {
      "type": "node",
      "id": "api",
      "label": "API",
      "icon": "⚡",
      "x": 50,
      "y": 55,
      "tone": "violet"
    },
    {
      "type": "node",
      "id": "db",
      "label": "Database",
      "icon": "🗄️",
      "x": 86,
      "y": 55,
      "tone": "emerald"
    },
    {
      "type": "link",
      "from": "app",
      "to": "api",
      "label": "request",
      "at": "line1"
    },
    {
      "type": "link",
      "from": "api",
      "to": "db",
      "label": "query",
      "flow": true,
      "at": "line2"
    },
    {
      "type": "highlight",
      "target": "db",
      "style": "ellipse",
      "tone": "amber",
      "at": "line3"
    }
  ],
  "lines": [
    {
      "say": "The app sends a request to the API."
    },
    {
      "say": "The API asks the database."
    },
    {
      "say": "That is where your data lives."
    }
  ]
}
```

## Square and tall videos

Everything that flows adapts by itself: a row wraps when it is full and the flow shrinks to fit. A component placed with `x` and `y` keeps that place, so a layout made for a wide board may need help on a phone. Every component takes a `phone` block with overrides for square and tall frames (1:1, 4:5, 3:4 and 9:16): any of `x`, `y`, `w`, `h`, `anchor`, `scale`, `rotate`, `hide`, and for a container its flow too (`direction`, `columns`, `gap` ...). `only` shows a component on `wide` or on `phone` frames only.

```json
[
  {
    "type": "card",
    "icon": "⚡",
    "title": "Fast",
    "text": "Starts in seconds.",
    "x": 25,
    "y": 50,
    "w": 28,
    "phone": {
      "x": 50,
      "y": 28,
      "w": 40
    }
  },
  {
    "type": "card",
    "icon": "🛡️",
    "title": "Safe",
    "text": "Private by design.",
    "tone": "emerald",
    "x": 75,
    "y": 50,
    "w": 28,
    "phone": {
      "x": 50,
      "y": 72,
      "w": 40
    }
  },
  {
    "type": "badge",
    "text": "Wide frames only",
    "only": "wide",
    "x": 50,
    "y": 94
  }
]
```

A video made for a phone can also be written for that board alone: the demos' habit tracker, training plan and party are laid out in the units of their own shape and need no overrides. A `phone` block with `x` or `y` on a component that has none is reported, because the flow of its container places it. Check that a diagram still reads on a phone: fewer nodes, bigger sizes.

## Components

58 kinds of component in 9 groups. Every one also takes the fields they all share (see **Fields every component has**). Each entry shows the smallest useful component of its kind, then its own fields.

| Group | Components |
| --- | --- |
| Layout | `spacer`, `divider`, `group` |
| Text | `title`, `text`, `badge`, `quote`, `typed`, `keys`, `code` |
| Cards & frames | `card`, `bubble`, `callout`, `note`, `stamp`, `panel`, `window`, `phone` |
| Lists & tables | `bullets`, `steps`, `timeline`, `table`, `compare`, `checklist`, `tags`, `legend` |
| Numbers & charts | `counter`, `stat`, `progress`, `ring`, `gauge`, `bars`, `chart`, `donut`, `sparkline`, `rating` |
| Pictures & icons | `image`, `avatar`, `avatars`, `icon`, `drawing` |
| Diagrams & guides | `node`, `link`, `marker`, `highlight`, `pointer` |
| Backdrops & decoration | `shape`, `glow`, `pattern`, `sparkles`, `confetti` |
| Interface & time | `button`, `toggle`, `input`, `slider`, `clock`, `calendar`, `toast` |

### Layout

Hold other components and decide where they go.

#### `spacer`

Empty room inside a flow: give it a `w` or an `h`, or let it grow to take what is left.

```json
{"type":"spacer","w":4,"h":4}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `grow` | `boolean` | no | Takes all the space that is left in the row or column. |

#### `divider`

A line that draws itself across, with a small label in the middle if you like.

```json
{"type":"divider","label":"or","w":"60%"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `label` | `string` | no | A word in the middle of the line. Limits: 1–24 characters. |
| `vertical` | `boolean` | no | Run down instead of across. |
| `dashed` | `boolean` | no | A dashed line. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `group`

An invisible container that lays its `children` out as a row, a column, a grid or a stack, and moves, scales and fades them together. Nest groups to build any layout. It holds components in `children` (up to 24), laid out by the flow fields (see **Layouts with groups**).

```json
{"type":"group","direction":"row","gap":2,"children":[{"type":"badge","text":"One"},{"type":"badge","text":"Two"}]}
```

Nothing but the fields every component has.

### Text

Words in every size and style.

#### `title`

A big headline. Supports **emphasis**; `gradient` paints it in the colours of the theme.

```json
{"type":"title","text":"Ship **faster**","x":50,"y":18,"gradient":true}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | The headline. Limits: 1–100 characters. |
| `size` | `number` | no | Text size in units. Default 4.4. Limits: 0.8–20. |
| `align` | `enum` | no | How lines of text line up. Default `center`. Allowed: `left`, `center`, `right`. |
| `weight` | `integer` | no | Boldness, 300 to 900. Default 800. Limits: 300–900. |
| `gradient` | `boolean` | no | Paint the text in a gradient of the accent colours. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `text`

A line or a paragraph of text. Supports **emphasis** and `code`.

```json
{"type":"text","text":"One board, any number of parts.","x":50,"y":30,"muted":true}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | The words. Limits: 1–280 characters. |
| `size` | `number` | no | Text size in units. Default 2.2. Limits: 0.8–20. |
| `align` | `enum` | no | How lines of text line up. Default `center`. Allowed: `left`, `center`, `right`. |
| `weight` | `integer` | no | Boldness, 300 to 900. Default 500. Limits: 300–900. |
| `muted` | `boolean` | no | Softer, as a caption would be. |
| `italic` | `boolean` | no | Slanted letters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `badge`

A small pill with a label and an optional icon, for a status, a tag or a price.

```json
{"type":"badge","text":"New","icon":"✨","tone":"amber","solid":true}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | The label. Limits: 1–24 characters. |
| `icon` | `string` | no | An emoji, a short symbol, or the name of a line icon (`rocket`, `chart`, `bolt`, `shield` ... the `icon` component lists them). Limits: 1–16 characters. |
| `solid` | `boolean` | no | A filled pill instead of an outlined one. |
| `size` | `number` | no | Text size in units. Default 1.8. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `quote`

A quotation with a big quotation mark and an optional author.

```json
{"type":"quote","text":"Make it simple, then make it beautiful.","by":"A designer","tone":"violet"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | What was said. Limits: 1–220 characters. |
| `by` | `string` | no | Who said it. Limits: 1–48 characters. |
| `size` | `number` | no | Text size in units. Default 2.4. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `typed`

Text that types itself out, letter by letter, with a blinking caret.

```json
{"type":"typed","text":"Hello, world.","mono":true,"tone":"emerald"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | What is typed. Limits: 1–160 characters. |
| `size` | `number` | no | Text size in units. Default 2.6. Limits: 0.8–20. |
| `mono` | `boolean` | no | Typewriter letters (monospace). |
| `caret` | `boolean` | no | `false` hides the caret. Default `true`. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `keys`

Keyboard keys pressed one after another, like ⌘ + K.

```json
{"type":"keys","keys":["⌘","K"],"tone":"sky"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `keys` | `string[]` | yes | The keys, in the order they are pressed. Limits: 1–5 items, each 1–8 characters. |
| `size` | `number` | no | Text size in units. Default 2.4. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `code`

A block of code whose lines appear one by one. `highlight` marks lines.

```json
{"type":"code","title":"app.ts","lines":["const video = compose(scene);","video.play();"],"highlight":[2]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `lines` | `string[]` | yes | The lines of code, as plain text. Limits: 1–12 items, each up to 80 characters. |
| `title` | `string` | no | A file name shown in the top bar. Limits: 1–32 characters. |
| `highlight` | `integer[]` | no | Numbers of the lines to mark, counting from 1. Limits: up to 12 items, each 1–12. |
| `numbers` | `boolean` | no | Show line numbers. |
| `size` | `number` | no | Text size in units. Default 1.7. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

### Cards & frames

Surfaces that hold a message, or other components.

#### `card`

A glass card with an icon, a title and a line of text. The workhorse of most compositions.

```json
{"type":"card","title":"Plan","text":"Decide what to say.","icon":"🧭","tone":"violet"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | `string` | no | The heading of the card. Limits: 1–48 characters. |
| `text` | `string` | no | A line or two of text. Limits: 1–150 characters. |
| `icon` | `string` | no | An emoji, a short symbol, or the name of a line icon (`rocket`, `chart`, `bolt`, `shield` ... the `icon` component lists them). Limits: 1–16 characters. |
| `badge` | `string` | no | A small label in the corner. Limits: 1–16 characters. |
| `align` | `enum` | no | `left` (default) or `center`. Allowed: `left`, `center`. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `bubble`

A chat bubble with a tail. Put two with different `side`s for a conversation.

```json
{"type":"bubble","text":"Is the video ready?","from":"Sam","side":"left"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | The message. Limits: 1–150 characters. |
| `from` | `string` | no | The name of who says it, above the bubble. Limits: 1–24 characters. |
| `side` | `enum` | no | Which side the tail points to. Default `left`. Allowed: `left`, `right`. |
| `size` | `number` | no | Text size in units. Default 2. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `callout`

A note with an icon that stands out: a tip, a warning, a fact. `rose` warns, `emerald` confirms.

```json
{"type":"callout","title":"Tip","text":"Start with the question.","icon":"💡","tone":"amber"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | The note. Limits: 1–180 characters. |
| `title` | `string` | no | A short heading. Limits: 1–40 characters. |
| `icon` | `string` | no | An emoji, a short symbol, or the name of a line icon (`rocket`, `chart`, `bolt`, `shield` ... the `icon` component lists them). Limits: 1–16 characters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `note`

A sticky note, a little crooked, for a brainstorm or a whiteboard.

```json
{"type":"note","text":"Ask why five times","tone":"amber","tape":true,"rotate":-4}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | What is written on it. Limits: 1–120 characters. |
| `tape` | `boolean` | no | A strip of tape on top. |
| `size` | `number` | no | Text size in units. Default 2. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `stamp`

A rubber stamp that slams on, crooked, like APPROVED or PAID.

```json
{"type":"stamp","text":"Approved","tone":"emerald","rotate":-10}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | yes | The word on the stamp. Limits: 1–16 characters. |
| `size` | `number` | no | Text size in units. Default 3.6. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `panel`

A titled panel that holds other components in its `children`. It holds components in `children` (up to 24), laid out by the flow fields (see **Layouts with groups**).

```json
{"type":"panel","title":"Today","icon":"📌","children":[{"type":"badge","text":"Live"}]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | `string` | no | The heading of the panel. Limits: 1–48 characters. |
| `icon` | `string` | no | An emoji, a short symbol, or the name of a line icon (`rocket`, `chart`, `bolt`, `shield` ... the `icon` component lists them). Limits: 1–16 characters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `window`

A window with a title bar (a Mac window, a browser with an address bar, or a terminal) that holds other components in its `children`. It holds components in `children` (up to 24), laid out by the flow fields (see **Layouts with groups**).

```json
{"type":"window","look":"browser","url":"videobana.com","children":[{"type":"text","text":"Hello"}]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | `string` | no | The title in the bar. For a `browser` this is shown when there is no `url`. Limits: 1–40 characters. |
| `url` | `string` | no | The address in the bar of a `browser` window. Limits: 1–60 characters. |
| `look` | `enum` | no | `mac` (default), `browser`, `terminal` (dark, for code) or `plain` (no bar). Allowed: `mac`, `browser`, `terminal`, `plain`. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `phone`

A phone with a screen that holds other components in its `children`. Give it a `w` and an `h` (about 20 by 40). It holds components in `children` (up to 24), laid out by the flow fields (see **Layouts with groups**).

```json
{"type":"phone","w":20,"h":40,"children":[{"type":"badge","text":"Inbox"}]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dark` | `boolean` | no | A dark screen. |
| `notch` | `boolean` | no | `false` leaves out the camera notch. Default `true`. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

### Lists & tables

Several entries that come in one after another.

#### `bullets`

A list of points that come in one after another, each with a marker.

```json
{"type":"bullets","items":["Fast","Flexible","Beautiful"],"marker":"check","tone":"emerald"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `string[]` | yes | The points. Each supports **emphasis**. Limits: 1–12 items, each 1–80 characters. |
| `marker` | `enum` | no | `dot` (default), `check`, `arrow` or `number`. Allowed: `dot`, `check`, `arrow`, `number`. |
| `size` | `number` | no | Text size in units. Default 2.2. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `steps`

Numbered steps joined by a line, the first to the last. Lays out as a row or as a column.

```json
{"type":"steps","items":["Write","Preview","Publish"],"direction":"row"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `string[]` | yes | What happens in each step. Limits: 2–8 items, each 1–80 characters. |
| `direction` | `enum` | no | `row` (default) or `column`. Allowed: `row`, `column`. |
| `size` | `number` | no | Text size in units. Default 1.9. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `timeline`

Dated events along a line, each with a title and an optional line of text.

```json
{"type":"timeline","events":[{"when":"2024","title":"Idea"},{"when":"2025","title":"Launch"}]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `events` | `object[]` | yes | The events, in order. Limits: 2–8 items. |
| `events[].when` | `string` | yes | The date or time, written as you want it shown. Limits: 1–16 characters. |
| `events[].title` | `string` | yes | What happened. Limits: 1–48 characters. |
| `events[].text` | `string` | no | A line under the title. Limits: 1–100 characters. |
| `direction` | `enum` | no | `column` (default) or `row`. Allowed: `row`, `column`. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `table`

A table whose rows appear one after another. The first row of `rows` is the header unless `header` is `false`.

```json
{"type":"table","rows":[["Plan","Price"],["Free","$0"],["Pro","$12"]]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rows` | `string[][]` | yes | The rows, each a list of cells (the same number in every row). Limits: 2–10 items, each 1–6 items, each up to 32 characters. |
| `header` | `boolean` | no | The first row is a header. Default `true`. |
| `size` | `number` | no | Text size in units. Default 1.8. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `compare`

Two columns side by side, such as before and after or pros and cons.

```json
{"type":"compare","left":{"title":"Before","items":["Slow"],"tone":"rose"},"right":{"title":"After","items":["Fast"],"tone":"emerald"},"marks":true}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `left` | `object` | yes | The left column. |
| `left.title` | `string` | yes | The heading of the column. Limits: 1–32 characters. |
| `left.items` | `string[]` | yes | The points, one to six. Limits: 1–6 items, each 1–80 characters. |
| `left.tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |
| `right` | `object` | yes | The right column. |
| `right.title` | `string` | yes | The heading of the column. Limits: 1–32 characters. |
| `right.items` | `string[]` | yes | The points, one to six. Limits: 1–6 items, each 1–80 characters. |
| `right.tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |
| `marks` | `boolean` | no | Mark the points of the left column with ✕ and those of the right with ✓. |
| `size` | `number` | no | Text size in units. Default 1.9. Limits: 0.8–20. |

#### `checklist`

A to-do list whose boxes are ticked one after another.

```json
{"type":"checklist","items":["Script","Voice","Export"],"done":2}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `string[]` | yes | The tasks. Limits: 1–12 items, each 1–80 characters. |
| `done` | `integer` | no | How many of the first tasks get ticked. Default all of them. Limits: 0–12. |
| `size` | `number` | no | Text size in units. Default 2. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `tags`

A cloud of small pills that pop in, one after another.

```json
{"type":"tags","items":["Design","Motion","Sound"]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `string[]` | yes | The tags. Limits: 1–16 items, each 1–24 characters. |
| `icon` | `string` | no | An icon in front of each tag. Limits: 1–16 characters. |
| `size` | `number` | no | Text size in units. Default 1.7. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `legend`

Small colour swatches with their names, to read a chart by.

```json
{"type":"legend","items":[{"label":"Sales","tone":"violet"},{"label":"Costs","tone":"rose"}]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `object[]` | yes | The entries. Give each a `tone` to match what it names. Limits: 1–8 items. |
| `items[].label` | `string` | yes | The name next to the swatch. Limits: 1–24 characters. |
| `items[].tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |
| `direction` | `enum` | no | `row` (default) or `column`. Allowed: `row`, `column`. |
| `size` | `number` | no | Text size in units. Default 1.6. Limits: 0.8–20. |

### Numbers & charts

Values that count up, fill and grow.

#### `counter`

A big number that counts up (or down) to its value while it builds.

```json
{"type":"counter","value":12500,"prefix":"$","label":"Monthly revenue","tone":"emerald"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `number` | yes | The number it ends on. Limits: -1000000000000–1000000000000. |
| `from` | `number` | no | The number it starts from. Default 0. Limits: -1000000000000–1000000000000. |
| `decimals` | `integer` | no | Digits after the decimal point. Default 0 (1 with the `compact` format). Limits: 0–4. |
| `format` | `enum` | no | `commas` (default) writes 12,500, `plain` 12500 and `compact` 12.5K. Allowed: `commas`, `plain`, `compact`. |
| `prefix` | `string` | no | Written before the number, such as `$`. Limits: up to 4 characters. |
| `suffix` | `string` | no | Written after the number, such as `%` or `K`. Limits: up to 6 characters. |
| `label` | `string` | no | A caption under the number. Limits: 1–40 characters. |
| `size` | `number` | no | Text size in units. Default 8. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `stat`

A figure tile: a number that counts up, a label and, if you like, how much it changed.

```json
{"type":"stat","value":4820,"label":"Visitors","change":12.4,"decimals":0}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `number` | yes | The number. Limits: -1000000000000–1000000000000. |
| `label` | `string` | yes | What it measures. Limits: 1–32 characters. |
| `change` | `number` | no | The change in percent: positive shows ▲ in green, negative ▼ in red. Limits: -1000–1000. |
| `decimals` | `integer` | no | Digits after the decimal point. Default 0 (1 with the `compact` format). Limits: 0–4. |
| `format` | `enum` | no | `commas` (default) writes 12,500, `plain` 12500 and `compact` 12.5K. Allowed: `commas`, `plain`, `compact`. |
| `prefix` | `string` | no | Written before the number, such as `$`. Limits: up to 4 characters. |
| `suffix` | `string` | no | Written after the number, such as `%` or `K`. Limits: up to 6 characters. |
| `icon` | `string` | no | An emoji or the name of a line icon. Limits: 1–16 characters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `progress`

A horizontal bar that fills up to a percentage.

```json
{"type":"progress","value":72,"label":"Upload","tone":"sky"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `number` | yes | How full it gets, 0 to 100. Limits: 0–100. |
| `label` | `string` | no | A caption above the bar. Limits: 1–40 characters. |
| `showValue` | `boolean` | no | Write the percentage next to the caption, counting up. Default `true`. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `ring`

A circle that fills up to a percentage, with the number counting in the middle.

```json
{"type":"ring","value":85,"label":"Done","tone":"emerald","w":14}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `number` | yes | How full it gets, 0 to 100. Limits: 0–100. |
| `label` | `string` | no | A caption under the number. Limits: 1–24 characters. |
| `size` | `number` | no | Text size of the number, in units. Default 4. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `gauge`

A dial whose needle swings to a value between 0 and 100.

```json
{"type":"gauge","value":68,"label":"Speed","w":18}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `number` | yes | Where the needle ends, 0 to 100. Limits: 0–100. |
| `label` | `string` | no | A caption under the dial. Limits: 1–24 characters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `bars`

A bar chart that grows, bar by bar, with the values counting up.

```json
{"type":"bars","data":[{"label":"Q1","value":40},{"label":"Q2","value":65},{"label":"Q3","value":92}],"h":24}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `object[]` | yes | The bars. Limits: 2–8 items. |
| `data[].label` | `string` | yes | What the value is of. Limits: 1–20 characters. |
| `data[].value` | `number` | yes | The value. Negative values are not drawn. Limits: 0–1000000000000. |
| `data[].tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |
| `direction` | `enum` | no | `vertical` (default) or `horizontal`. Allowed: `vertical`, `horizontal`. |
| `max` | `number` | no | The value of a full bar. Default: the largest value. Limits: 0–1000000000000. |
| `values` | `boolean` | no | Write the value of each bar. Default `true`. |
| `decimals` | `integer` | no | Digits after the decimal point. Default 0 (1 with the `compact` format). Limits: 0–4. |
| `format` | `enum` | no | `commas` (default) writes 12,500, `plain` 12500 and `compact` 12.5K. Allowed: `commas`, `plain`, `compact`. |
| `prefix` | `string` | no | Written before the number, such as `$`. Limits: up to 4 characters. |
| `suffix` | `string` | no | Written after the number, such as `%` or `K`. Limits: up to 6 characters. |
| `size` | `number` | no | Size of the labels, in units. Default 1.7. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `chart`

A line chart that draws itself, with one to three series. `area` fills under the lines.

```json
{"type":"chart","series":[{"name":"Users","values":[4,9,7,15,22],"tone":"violet"}],"labels":["Mon","Tue","Wed","Thu","Fri"],"area":true,"h":22}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `series` | `object[]` | yes | The lines. Each has its own `values`, evenly spread from left to right. Limits: 1–3 items. |
| `series[].name` | `string` | no | Shown in the key under the chart. Limits: 1–24 characters. |
| `series[].values` | `number[]` | yes | The points of the line, from left to right. Limits: 2–24 items, each -1000000000000–1000000000000. |
| `series[].tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |
| `labels` | `string[]` | no | What is written under the chart, evenly spread. Fewer labels than values are spread over the width. Limits: up to 24 items, each up to 10 characters. |
| `area` | `boolean` | no | Fill under the lines. |
| `dots` | `boolean` | no | A dot at every value. |
| `grid` | `boolean` | no | Faint horizontal lines. Default `true`. |
| `size` | `number` | no | Size of the labels, in units. Default 1.5. Limits: 0.8–20. |

#### `donut`

A donut chart whose slices sweep round one after another. A label in the middle if you like.

```json
{"type":"donut","data":[{"label":"Rent","value":40},{"label":"Food","value":25},{"label":"Fun","value":15}],"centre":"total","w":16}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `object[]` | yes | The slices. Limits: 2–8 items. |
| `data[].label` | `string` | yes | What the value is of. Limits: 1–20 characters. |
| `data[].value` | `number` | yes | The value. Negative values are not drawn. Limits: 0–1000000000000. |
| `data[].tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |
| `centre` | `string` | no | Written in the middle: a short text, or `total` for the sum of the values. Limits: 1–16 characters. |
| `legend` | `boolean` | no | List the slices beside the donut. |
| `decimals` | `integer` | no | Digits after the decimal point. Default 0 (1 with the `compact` format). Limits: 0–4. |
| `format` | `enum` | no | `commas` (default) writes 12,500, `plain` 12500 and `compact` 12.5K. Allowed: `commas`, `plain`, `compact`. |
| `prefix` | `string` | no | Written before the number, such as `$`. Limits: up to 4 characters. |
| `suffix` | `string` | no | Written after the number, such as `%` or `K`. Limits: up to 6 characters. |
| `size` | `number` | no | Text size in the middle, in units. Default 3. Limits: 0.8–20. |

#### `sparkline`

A tiny line with no axes, to show a trend next to a number.

```json
{"type":"sparkline","values":[3,5,4,7,6,9,12],"area":true,"w":14,"h":5}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `values` | `number[]` | yes | The values, evenly spread from left to right. Limits: 3–24 items, each -1000000000000–1000000000000. |
| `area` | `boolean` | no | Fill under the line. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `rating`

Stars that light up one after another, up to a score.

```json
{"type":"rating","value":4.5,"tone":"amber"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `number` | yes | The score. Half stars are drawn for values like 4.5. Limits: 0–10. |
| `max` | `integer` | no | How many stars there are. Default 5. Limits: 1–10. |
| `size` | `number` | no | Size of a star, in units. Default 3. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

### Pictures & icons

Photos, people, line icons and vector drawings.

#### `image`

A picture (made in the editor, uploaded, or linked), with a frame and an optional caption.

```json
{"type":"image","src":"/api/assets/cover","alt":"The cover","w":24,"h":14,"caption":"Cover art"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `src` | `string` | yes | Address of the picture: one made or uploaded in the editor (`/api/assets/<id>`), or an http(s) link. |
| `alt` | `string` | no | What the picture shows. Limits: 1–150 characters. |
| `fit` | `enum` | no | `cover` (default) fills the frame and crops; `contain` shows the whole picture. Allowed: `cover`, `contain`. |
| `shape` | `enum` | no | The shape of the frame. Default `rounded`. Allowed: `rounded`, `square`, `circle`. |
| `caption` | `string` | no | A line of text under the picture. Limits: 1–80 characters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `avatar`

A round picture of a person, or their initials, with an optional name under it.

```json
{"type":"avatar","name":"Ada Lovelace","status":"online","tone":"violet"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | no | The name written under the avatar; its initials are used when there is no picture. Limits: 1–32 characters. |
| `src` | `string` | no | A picture of the person. Without it, the initials. |
| `status` | `enum` | no | A small coloured dot in the corner. Allowed: `online`, `away`, `busy`. |
| `size` | `number` | no | Diameter in units. Default 7. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `avatars`

A row of overlapping avatars with a `+N` at the end: the team, the audience, the crowd.

```json
{"type":"avatars","names":["Ada Lovelace","Alan Turing","Grace Hopper"],"more":12}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `names` | `string[]` | yes | The people, as names (their initials are shown). Limits: 1–8 items, each 1–32 characters. |
| `more` | `integer` | no | The number shown as `+N` at the end. Limits: 1–9999. |
| `size` | `number` | no | Diameter of one avatar, in units. Default 5. Limits: 0.8–20. |

#### `icon`

A clean line icon from the built-in set, in a soft tile or on its own.

```json
{"type":"icon","glyph":"rocket","tone":"violet"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `glyph` | `enum` | yes | Which icon. Allowed: `bell`, `bolt`, `book`, `bot`, `brain`, `calendar`, `camera`, `chart`, `chat`, `chip`, `cloud`, `code`, `database`, `document`, `film`, `gauge`, `globe`, `headphones`, `heart`, `image`, `key`, `layers`, `lock`, `mail`, `mic`, `music`, `network`, `pen`, `play`, `rocket`, `search`, `server`, `settings`, `shield`, `sparkles`, `star`, `terminal`, `translate`, `users`, `video`, `wallet`, `wand`, `workflow`. |
| `tile` | `boolean` | no | A rounded tile behind the icon. Default `true`. |
| `size` | `number` | no | Size of the icon, in units. Default 6. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `drawing`

A vector drawing made of shapes: the shapes, canvases and `script` of a `motion` scene, drawn inside a box of this composition. Its `line1`, `line2` ... moments are those of the whole scene.

```json
{"type":"drawing","canvas":"square","w":16,"shapes":[{"id":"dot","type":"circle","size":30,"x":50,"y":50,"fill":"violet","enter":"pop"}]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canvas` | `enum` | no | The shape of the drawing area: `wide` (160 by 60), `square` (100 by 100) or `tall` (60 by 100). Default `wide`. Allowed: `wide`, `square`, `tall`. |
| `shapes` | `object[]` | yes | What is drawn, from the back to the front: `motion` shapes such as `rect`, `circle`, `line`, `text` and `path`, placed in canvas units. Limits: 1–40 items. |
| `script` | `string` | no | A GSAP timeline as text, as in the `motion` scene. Limits: up to 4000 characters. |

### Diagrams & guides

Nodes, connectors, markers and pointers that tie a picture together.

#### `node`

A node of a diagram: a rounded box or a circle with a label, to be joined by `link`s. Give it an `id`.

```json
{"type":"node","id":"api","label":"API","icon":"bolt","x":50,"y":50}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `label` | `string` | yes | What it is called. Limits: 1–32 characters. |
| `icon` | `string` | no | An emoji, a short symbol, or the name of a line icon (`rocket`, `chart`, `bolt`, `shield` ... the `icon` component lists them). Limits: 1–16 characters. |
| `shape` | `enum` | no | `box` (default), `pill`, `circle` or `diamond`. Allowed: `box`, `pill`, `circle`, `diamond`. |
| `solid` | `boolean` | no | Filled with the tone instead of glass. |
| `size` | `number` | no | Text size in units. Default 2. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `link`

A connector between two components (or points) that draws itself from `from` to `to`, and follows them if they move. It is drawn in front of the backdrops and behind the other components.

```json
{"type":"link","from":"a.right","to":"b.left","arrow":"end","label":"calls"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | `string \| [number, number]` | yes | Where it starts: the `id` of a component, with a side if you like (`card1.right`), or a point `[x, y]`. |
| `to` | `string \| [number, number]` | yes | Where it ends. |
| `shape` | `enum` | no | `curve` (default), `straight` or `elbow` (right angles). Allowed: `straight`, `curve`, `elbow`. |
| `arrow` | `enum` | no | Where there is an arrowhead. Default `end`. Allowed: `end`, `start`, `both`, `none`. |
| `dashed` | `boolean` | no | A dashed line. |
| `flow` | `boolean` | no | Dashes run along the line, as if something flows through it. |
| `thickness` | `number` | no | Thickness in units. Default 0.3. Limits: 0.1–2. |
| `label` | `string` | no | A small label in the middle of the line. Limits: 1–24 characters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `marker`

A small numbered or lettered circle: a step number on a diagram, or a pin on a picture.

```json
{"type":"marker","text":"1","pulse":true,"x":30,"y":40}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | no | A number or letter. Default: none, a plain dot. Limits: 1–3 characters. |
| `pulse` | `boolean` | no | Rings that spread out from the marker. |
| `size` | `number` | no | Diameter in units. Default 3.4. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `highlight`

A frame, a circle or an underline that draws itself around another component, to say: look here.

```json
{"type":"highlight","target":"card1","style":"ellipse","tone":"amber"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `target` | `string` | yes | The `id` of the component to point at. |
| `style` | `enum` | no | `box` (default), `ellipse`, `underline` or `bracket`. Allowed: `box`, `ellipse`, `underline`, `bracket`. |
| `pad` | `number` | no | Space between the target and the highlight, in units. Default 1. Limits: 0–10. |
| `label` | `string` | no | A small label on the highlight. Limits: 1–24 characters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `pointer`

A mouse pointer that glides to one place after another and clicks, to show someone how to do something.

```json
{"type":"pointer","path":[{"to":"a","click":true},{"to":"b","click":true}]}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `path` | `object[]` | yes | Where it goes, in order. Each stop is a component (or a point `[x, y]`) with an optional time and a click. It starts at the first stop. Limits: 1–8 items. |
| `path[].to` | `string \| [number, number]` | yes | The `id` of a component (`card1`, or with a side: `card1.right`), or a point of the board, `[x, y]` in percent. |
| `path[].at` | `number \| string` | no | When it gets there: seconds, or `line2` ... Limits: 0–600. |
| `path[].click` | `boolean` | no | Clicks when it gets there. |
| `hand` | `boolean` | no | A hand instead of an arrow. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

### Backdrops & decoration

Shapes, light, patterns and sparkle behind the story.

#### `shape`

A plain shape to build backdrops, bands and badges from. On the board it sits behind the other components (in the middle unless it has an `x` and a `y`, in front if you give it a `z`); inside a group it is laid out like any other component.

```json
{"type":"shape","kind":"blob","tone":"violet","x":20,"y":30,"w":30,"h":30,"opacity":0.4,"blur":2}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | `enum` | no | `circle` (default), `square`, `rounded`, `triangle`, `diamond`, `star`, `ring`, `heart` or `blob`. Allowed: `circle`, `square`, `rounded`, `triangle`, `diamond`, `star`, `ring`, `heart`, `blob`. |
| `fill` | `string` | no | Colour inside. Default: the `tone`, as a soft fill. |
| `fill2` | `string` | no | A second colour: the fill becomes a gradient from `fill` to `fill2`. |
| `stroke` | `string` | no | Colour of the outline. |
| `strokeWidth` | `number` | no | Thickness of the outline in units. Default 0.3. Limits: 0–5. |
| `blur` | `number` | no | Softens the shape, in units (a light that bleeds). Limits: 0–10. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `glow`

A soft pool of coloured light, behind everything on the board (inside a group it is laid out like any other component).

```json
{"type":"glow","tone":"sky","x":70,"y":30,"w":40,"h":40}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |
| `intensity` | `number` | no | How strong it is, 0 to 1. Default 0.6. Limits: 0–1. |

#### `pattern`

A tiled texture behind the others: dots, a grid or stripes. Fills the board unless you give it a size.

```json
{"type":"pattern","kind":"grid","opacity":0.3}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | `enum` | no | `dots` (default), `grid`, `lines` (horizontal) or `diagonal`. Allowed: `dots`, `grid`, `lines`, `diagonal`. |
| `spacing` | `number` | no | Distance between the marks, in units. Default 4. Limits: 1–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `sparkles`

Little stars that twinkle in a corner or all over the board. Fills the board unless you give it a size.

```json
{"type":"sparkles","count":14,"tone":"amber"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `count` | `integer` | no | How many. Default 12. Limits: 2–40. |
| `seed` | `integer` | no | A different number gives a different scatter. Limits: 0–9999. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `confetti`

A burst of confetti that falls once, for a celebration. Fills the board unless you give it a size.

```json
{"type":"confetti","count":40,"at":3}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `count` | `integer` | no | How many pieces. Default 36. Limits: 4–80. |
| `seed` | `integer` | no | A different number gives a different burst. Limits: 0–9999. |
| `from` | `enum` | no | `top` (default) rains down; `centre` bursts out of the middle. Allowed: `top`, `centre`. |

### Interface & time

Buttons, switches, fields, clocks and calendars.

#### `button`

A button. With `press` it gets clicked at that moment: it dips and a ripple spreads.

```json
{"type":"button","label":"Get started","icon":"🚀","press":2.5,"tone":"violet"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `label` | `string` | yes | What it says. Limits: 1–28 characters. |
| `icon` | `string` | no | An emoji, a short symbol, or the name of a line icon (`rocket`, `chart`, `bolt`, `shield` ... the `icon` component lists them). Limits: 1–16 characters. |
| `look` | `enum` | no | `solid` (default), `outline` or `ghost`. Allowed: `solid`, `outline`, `ghost`. |
| `press` | `number \| string` | no | When it is clicked: seconds, or `line2` ... Default: never. Limits: 0–600. |
| `size` | `number` | no | Text size in units. Default 2. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `toggle`

A switch that flips once it has come in. Several make a settings list.

```json
{"type":"toggle","label":"Dark mode","value":true,"tone":"emerald"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `label` | `string` | no | The name of the setting, beside the switch. Limits: 1–32 characters. |
| `value` | `boolean` | no | The state it ends in. It starts the other way round and flips when it has come in. Default `true` (ends on). |
| `flipAt` | `number \| string` | no | When it flips: seconds, or `line2` ... Default: just after it has come in. Limits: 0–600. |
| `size` | `number` | no | Text size in units. Default 2. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `input`

A text field in which words are typed: a search box, a form field, a prompt.

```json
{"type":"input","placeholder":"Search…","text":"northern lights","icon":"🔍"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | no | What is typed into it. Limits: 1–80 characters. |
| `placeholder` | `string` | no | The grey hint shown while it is empty. Limits: 1–40 characters. |
| `label` | `string` | no | A caption above the field. Limits: 1–24 characters. |
| `icon` | `string` | no | An icon at the start of the field, such as 🔍. Limits: 1–16 characters. |
| `size` | `number` | no | Text size in units. Default 2. Limits: 0.8–20. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `slider`

A slider whose knob glides to a value between 0 and 100.

```json
{"type":"slider","value":65,"label":"Volume","tone":"sky"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | `number` | yes | Where the knob ends, 0 to 100. Limits: 0–100. |
| `label` | `string` | no | A caption above the slider. Limits: 1–32 characters. |
| `showValue` | `boolean` | no | Write the value, counting along. Default `true`. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `clock`

A round clock whose hands sweep from one time to another.

```json
{"type":"clock","from":"9:00","time":"17:30","digital":true,"w":14}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `time` | `string` | no | The time it ends on, such as `3:45` (24-hour times work). Default 10:10. |
| `from` | `string` | no | The time it starts from. Default: the same as `time` (the hands stay still). |
| `digital` | `boolean` | no | Also write the time as digits under the clock. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `calendar`

A month with days that get circled one after another.

```json
{"type":"calendar","month":6,"year":2026,"highlight":[3,17,24],"w":26}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `month` | `integer` | yes | The month, 1 to 12. Limits: 1–12. |
| `year` | `integer` | yes | The year. Limits: 1970–2100. |
| `highlight` | `integer[]` | no | Days of the month to circle, in the order they come in. Limits: up to 12 items, each 1–31. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

#### `toast`

A notification that slides in with an icon, a title and a line of text.

```json
{"type":"toast","title":"Export finished","text":"Your video is ready.","icon":"✅","tone":"emerald"}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | `string` | yes | The heading. Limits: 1–40 characters. |
| `text` | `string` | no | A line of text. Limits: 1–100 characters. |
| `icon` | `string` | no | An emoji, a short symbol, or the name of a line icon (`rocket`, `chart`, `bolt`, `shield` ... the `icon` component lists them). Limits: 1–16 characters. |
| `tone` | `enum` | no | Accent colour, one of the colours of the theme (`violet`, `emerald`, `amber`, `rose`, `sky` ...). Default: the main colour of the video. Allowed: `violet`, `emerald`, `amber`, `rose`, `sky`, `fuchsia`, `teal`, `orange`. |

## Fields every component has

Placement (where it is and how big), timing (when and how it moves), a name to point at, and what changes on phone-shaped frames:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | no | A name that other components can point at (`link`, `highlight`, `pointer`). Unique in the scene. |
| `x` | `number` | no | Where the component sits across the board, in percent of its width: 0 is the left edge, 50 the middle, 100 the right edge. Without `x` and `y` the component is placed by the flow of its container instead (the board lines its components up in a column in the middle). Limits: -300–300. |
| `y` | `number` | no | Where the component sits down the board, in percent of its height: 0 is the top, 50 the middle, 100 the bottom. Limits: -300–300. |
| `anchor` | `enum` | no | Which point of the component sits at `x`,`y`. Default `center`; `top-left` puts its corner there. Allowed: `center`, `top`, `bottom`, `left`, `right`, `top-left`, `top-right`, `bottom-left`, `bottom-right`. |
| `w` | `number \| string` | no | Width: a number of units (1 unit is 1% of the width of a landscape video) or a percentage of what the component sits in, such as "50%". Each component has a width of its own to start from. Limits: 0–300. |
| `h` | `number \| string` | no | Height, in the same terms as `w`. Default: as tall as its content. Limits: 0–300. |
| `scale` | `number` | no | Makes the whole component, text included, bigger or smaller. Default 1. Limits: 0.1–10. |
| `rotate` | `number` | no | Turns the component, in degrees clockwise. Limits: -360–360. |
| `opacity` | `number` | no | 0 is invisible, 1 solid (default). Limits: 0–1. |
| `z` | `integer` | no | Which component is in front: the higher one wins. Default: later in the list is in front; backdrops (`pattern`, `glow`, `shape`) are behind and `link`s are between. Limits: -10–100. |
| `phone` | `object` | no | Overrides for phone-shaped frames (1:1, 4:5, 3:4 and 9:16 videos, whose board is half as wide in units): any of `x`, `y`, `w`, `h`, `anchor`, `scale`, `rotate`, or `hide: true`. |
| `phone.x` | `number` | no | Where the component sits across the board, in percent of its width: 0 is the left edge, 50 the middle, 100 the right edge. Without `x` and `y` the component is placed by the flow of its container instead (the board lines its components up in a column in the middle). Limits: -300–300. |
| `phone.y` | `number` | no | Where the component sits down the board, in percent of its height: 0 is the top, 50 the middle, 100 the bottom. Limits: -300–300. |
| `phone.anchor` | `enum` | no | Which point of the component sits at `x`,`y`. Default `center`; `top-left` puts its corner there. Allowed: `center`, `top`, `bottom`, `left`, `right`, `top-left`, `top-right`, `bottom-left`, `bottom-right`. |
| `phone.w` | `number \| string` | no | Width: a number of units (1 unit is 1% of the width of a landscape video) or a percentage of what the component sits in, such as "50%". Each component has a width of its own to start from. Limits: 0–300. |
| `phone.h` | `number \| string` | no | Height, in the same terms as `w`. Default: as tall as its content. Limits: 0–300. |
| `phone.scale` | `number` | no | Makes the whole component, text included, bigger or smaller. Default 1. Limits: 0.1–10. |
| `phone.rotate` | `number` | no | Turns the component, in degrees clockwise. Limits: -360–360. |
| `phone.hide` | `boolean` | no | `true` leaves the component out on phone-shaped frames. |
| `only` | `enum` | no | Show the component only on `wide` frames (landscape videos) or only on `phone` frames (square and portrait videos). Allowed: `wide`, `phone`. |
| `at` | `number \| string` | no | When the component comes in: seconds from the start of the scene, or `line2` for the moment the second line of narration is spoken. Default: one after another, a quarter of a second apart (the children of a container follow their container). Limits: 0–600. |
| `delay` | `number` | no | Extra seconds before `enter`. Limits: 0–600. |
| `enter` | `enum` | no | How the component comes in. Default `fade`; `none` puts it there at once. Allowed: `fade`, `rise`, `drop`, `slide-left`, `slide-right`, `pop`, `zoom`, `spin`, `flip`, `blur`, `wipe`, `grow`, `draw`, `none`. |
| `duration` | `number` | no | Seconds `enter` and `exit` take. Default depends on the movement. Limits: 0.05–30. |
| `build` | `number` | no | Seconds the inside of the component takes to build itself (bars growing, a number counting up, rows appearing). Default depends on the component. Limits: 0.05–30. |
| `loop` | `enum` | no | A movement that repeats for as long as the component is on screen. Allowed: `float`, `pulse`, `spin`, `sway`, `bounce`, `blink`, `wiggle`, `breathe`. |
| `exit` | `enum` | no | How the component leaves, at `exitAt`. Default `fade`. Allowed: `fade`, `shrink`, `slide-left`, `slide-right`, `slide-up`, `slide-down`, `blur`, `zoom`. |
| `exitAt` | `number \| string` | no | When the component leaves, in the same terms as `at`. Limits: 0–600. |

`enter`: the table says the default is `fade`; some kinds come in their own way when it is left out (see **Timing and movement**).

## Recipes

Whole scenes, to copy and change.

### A dashboard

Tiles in a row above a chart. Groups line things up, and each part comes in with the line that talks about it.

```json
{
  "kind": "compose",
  "heading": "This week",
  "components": [
    {
      "type": "group",
      "direction": "column",
      "gap": 2.4,
      "children": [
        {
          "type": "group",
          "direction": "row",
          "gap": 2,
          "at": "line1",
          "children": [
            {
              "type": "stat",
              "label": "Visitors",
              "value": 48200,
              "change": 12,
              "icon": "👀",
              "tone": "sky",
              "w": 22
            },
            {
              "type": "stat",
              "label": "Sign-ups",
              "value": 3180,
              "change": 8,
              "icon": "✍️",
              "tone": "emerald",
              "w": 22
            },
            {
              "type": "stat",
              "label": "Revenue",
              "value": 9400,
              "prefix": "$",
              "change": -3,
              "icon": "💰",
              "tone": "amber",
              "w": 22
            }
          ]
        },
        {
          "type": "chart",
          "series": [
            {
              "name": "Visitors",
              "values": [
                12,
                18,
                15,
                26,
                31,
                29,
                38
              ],
              "tone": "sky"
            }
          ],
          "labels": [
            "Mon",
            "Tue",
            "Wed",
            "Thu",
            "Fri",
            "Sat",
            "Sun"
          ],
          "area": true,
          "w": 70,
          "h": 12,
          "at": "line2"
        }
      ]
    }
  ],
  "lines": [
    {
      "say": "Three numbers tell the story of the week."
    },
    {
      "say": "And the line shows how it grew."
    }
  ]
}
```

### An app tour on a phone

A phone mock-up holds other components. Switches flip and a button is pressed at the moment a line is spoken, while a pointer glides from one to the next.

Made for `9:16` (`"aspect": "9:16"` in the document).

```json
{
  "kind": "compose",
  "heading": "Make it yours",
  "components": [
    {
      "type": "phone",
      "w": 28,
      "h": 57,
      "children": [
        {
          "type": "title",
          "text": "Settings",
          "size": 3
        },
        {
          "type": "toggle",
          "id": "dark",
          "label": "Dark mode",
          "value": true,
          "size": 2,
          "flipAt": "line1"
        },
        {
          "type": "toggle",
          "id": "alerts",
          "label": "Alerts",
          "value": true,
          "size": 2,
          "flipAt": "line2",
          "tone": "sky"
        },
        {
          "type": "button",
          "id": "save",
          "label": "Save",
          "press": "line3",
          "size": 2
        }
      ]
    },
    {
      "type": "pointer",
      "hand": true,
      "path": [
        {
          "to": "dark",
          "at": "line1",
          "click": true
        },
        {
          "to": "alerts",
          "at": "line2",
          "click": true
        },
        {
          "to": "save",
          "at": "line3",
          "click": true
        }
      ]
    }
  ],
  "lines": [
    {
      "say": "Turn on dark mode."
    },
    {
      "say": "Choose which alerts you want."
    },
    {
      "say": "Then save."
    }
  ]
}
```

### A countdown and a reveal

A number counts down while the first line is spoken; a stamp and confetti land with the second.

```json
{
  "kind": "compose",
  "components": [
    {
      "type": "sparkles",
      "count": 16,
      "tone": "amber",
      "at": "line2"
    },
    {
      "type": "group",
      "direction": "column",
      "gap": 3,
      "children": [
        {
          "type": "counter",
          "from": 10,
          "value": 0,
          "label": "seconds to go",
          "size": 9,
          "build": 4,
          "tone": "rose"
        },
        {
          "type": "stamp",
          "text": "Launched!",
          "size": 4,
          "tone": "emerald",
          "rotate": -6,
          "at": "line2"
        }
      ]
    },
    {
      "type": "confetti",
      "count": 80,
      "at": "line2"
    }
  ],
  "lines": [
    {
      "say": "Ten seconds to go."
    },
    {
      "say": "Launched!"
    }
  ]
}
```

## Limits

The limits keep a scene readable at phone size and cheap to draw. A scene that goes over one is reported with its location.

| What | Limit |
| --- | --- |
| Components on the board itself | 60 |
| Components in the whole scene, children included | 120 |
| Children of one container | 24 |
| Containers inside containers (the board is not counted) | 4 |
| Lines of narration | 12 |
| The latest moment a component may be timed to, in seconds (`at`, `exitAt`, `delay`) | 600 |
| Characters of a paragraph | 280 |
| Characters of a headline | 100 |
| Characters of a label | 48 |
| Characters of a list entry | 80 |
| Entries of a list, a legend or a set of tags | 12 |
| Rows of a table | 10 |
| Columns of a table | 6 |
| Points of a chart | 24 |
| Slices of a donut | 8 |
| How far off the board a component may be put, in percent (to slide in from the edge) | 300 |
| The biggest width, height or size of a component, in units | 300 |

## Checks

A composition is checked as it would play. Errors stop the video from being saved; warnings do not.

- Error: an unknown `type` (the message lists the closest ones), or a field the component does not have.
- Error: more than 120 components in all, or containers nested more than 4 levels deep.
- Error: two components with the same `id`; a `link`, `highlight` or `pointer` that points at a name no component has, or at itself.
- Error: `at`, `exitAt`, `press`, `flipAt` or a pointer stop at a `lineN` the scene does not have; an `exitAt` that is not later than the moment the component comes in.
- Error: a `donut` whose values are all zero; a `calendar` day that does not exist in its month; every problem of the shapes and script of a `drawing` (see `videobana-motion-graphics`).
- Warning: `exit` without `exitAt`; an `x` or `y` far outside the board; a `w` or `h` bigger than the whole video; a `phone.x` or `phone.y` on a component that flows; a `table` row with a different number of cells from the first; a `bars` value above its `max`.

## Making compositions that say something

- Make compositions that say something: 5 to 12 components, one clear idea, parts that arrive as the narration reaches them. Tie what matters to the narration: a chart at `line2`, a highlight at `line3`.
- Use `bars`, `table`, `bullets` or `tags` for many entries instead of many components. Backdrops (`pattern`, `glow`, `shape`) go first in the list. Do not stack components on top of each other by accident, and keep every text short.
- Never invent the address of a picture: use `image` (and the `src` of an `avatar`) only with an address the user gave. Otherwise show people with `avatar` initials, things with `icon` or `drawing`, and places with `node`s.
- Pictures are added like in any other scene: an `image` (or the `src` of an `avatar`) takes an address from the editor's pictures or a link. The `drawing` component takes the shapes of a `motion` scene (see `videobana-motion-graphics`).
- Prefer another scene when one shows the content as well: a `compose` scene is for what no other scene gives (a dashboard, a product tour, an architecture diagram, an infographic, a UI mock-up, a scene that mixes a chart, a list and a picture).
