Reelify Motion Kit 0.1 preview
Docs/Guide

Scenes

The scene record, the five elements and their props, how layout works, how time works, and how ids and parts are named.

A scene is one JSON object. compile(spec, registry) expands its components into elements, works out when everything starts, checks it, and returns frame(t). This page is the reference for the record.

The scene record#

FieldTypeMeaning
size[width, height]The frame in pixels. Default [1080, 1920].
durationsecondsRequired.
backgroundcolourA palette name or a colour value. Default "ground".
rootnodeRequired. The tree.
cues{ name: seconds }Named times. Behaviors and start point at them by name. Expressions read them as numbers.
transcript[{ w, start, end }]Timed words. Word 0 supplies the cues word0In and word0Out, word 1 supplies word1In and word1Out, and so on.
audiopath or URLThe matching sound, for a host that plays it. The kit does not play or mix it.
signals{ name: definition }Named values over time. See Expressions.
speednumber2 makes every curve twice as quick. Times pinned with at do not move.

The kit fields#

These fields give names their values. A scene can carry them itself, or a design system can supply them.

FieldMeaning
paletteColour names to values: ink, paper, ground, accent, accent2, onAccent, muted, good, bad, night, white, black.
fontsThe CSS family behind each font role: display, body, mono, serif.
typefacesRemaps one font role to another for the whole scene: { "display": "mono" }.
tokensNamed numbers, words, lists and records. Read as "$name", inside "=expr", or as "{name}" in text.
surfacesNamed box styles. A box with "surface": "card" takes that style.
curves, posesNamed curves and poses. Redefining a built-in name changes it everywhere.
defaultsDefault props per component. "*" applies to every component that has the prop.
components, behaviorsComponents and behaviors defined for this scene. See Custom components and Behaviors.

Nodes#

json
{ "el": "NAME", "id": "optional", "start": 0.5, "motion": [], "children": [] }

el is an element, a component, or "Motion": a bare box that exists to carry behaviors around its children. Every other key is a prop. Every node takes these:

PropMeaning
idA name other things can point at.
startWhen the node's clock starts. See Time, below.
w, hPixels, or "fill". grow takes the free space in the parent.
place[x, y] as fractions of the parent (0 to 1). Puts the node's centre there, out of the flow.
scale, rotate, opacity, originA fixed transform. origin is the point scale and rotation happen around: center, left, top left and so on.
glowA soft light of this colour around the node.
apertureA circular reveal, 0 closed to 1 open.
localtrue makes seconds written inside this node count from its own start.
backfacefalse hides the node while it is turned away from the camera.

The five elements#

ElementWhat it isMain props
boxA container.dir, gap, pad, align, justify, wrap, cols; surface, fill, radius, border, borderW, shadow, hard, frost, pattern; clip, perspective, space; spotX, spotY, spotR; rtl
textWords.text (required), size (default 56), weight (default 700), color (default "ink"), font (a role, default "display"), align, maxW, leading, tracking, upper, italic, outline, outlineW; split (word, char, line), mark, markColor, markStyle, markMotion
shapeA drawn shape.kind: rect, circle, ring, check, arrow, line, path, spark; fill, stroke, strokeW, radius, progress (ring), d and vb (path), values (spark)
iconA line icon.name (required): check, x, plus, arrow, heart, star, bolt, play, clock, user, chat, mic, sparkle, search, bell, scissors, music, send, cursor; size, color, strokeW, fill
imgA picture, a sprite sheet or a video.src, fit, radius, shadow, label, sheet, frame, clip. See Media.

A colour is a palette name, a colour value, or "a>b" for a gradient in a fill. Prefer palette names: the scene then works under every design system. A misspelt prop is a problem, and the message lists the props the element takes.

Layout#

Layout is flow layout, like a column or a row in a design tool.

  • The root box is the frame. It fills the frame and centres its children.
  • Every other box is only as big as its content unless it has w and h.
  • "fill" needs a parent that has a size. h: "fill" under a parent with no height is reported as a note.
  • dir is "col" (default), "row" or "stack". In a stack, children sit on top of each other, centred. Later children draw on top.
  • gap is the space between children in pixels. pad is pixels, or [vertical, horizontal].
  • align is across the direction: start, center, end, stretch. justify is along it: start, center, end, between.
  • cols lays children out as a grid that many columns wide.
  • place takes a node out of the flow and puts its centre at a fraction of its parent.
A stack holding a row of three sized cards and one box placed at the top centre. Four of the five elements appear: box, icon, shape, text.
Layout is measured by the browser. The compile check knows sizes you wrote, and does not know how wide a line of text came out. Checks that depend on measured size (mounted.lint(), the overlap audit) need a mounted scene.

Time#

Every node has a clock that begins at its start. Its behaviors and its children count from there.

Written asMeaning
"start": 1.2Seconds.
"start": "hit"A cue: an entry in the scene's cues, or a word cue from transcript.
"start": { "after": "first", "gap": 0.3 }Once the node with that id has finished arriving, plus the gap. The other node must come earlier in the tree. Motion that never stops (loop, drive) does not count as arriving.
no startThe parent's start, plus the node's slot in the parent's stagger if it has one.

A behavior has its own at: seconds, a cue name, or "end" for the scene's last second. Left out, the behavior starts at its node's start. delay adds to that. at moves only that behavior. start moves the node and everything inside it, which is how a whole component is delayed.

  • A node with enter does not exist before it enters. A node with exit is gone after it leaves.
  • A node with no enter is there from the first frame, whatever its start.
  • during shows a node and its children only inside a window: { "do": "during", "at": 2.4, "until": 4.2 }.
  • "local": true on a node makes numbers written inside it count from its own start. Sequence sets this on every scene, so a scene can be moved or retimed whole.
  • A behavior that starts after the scene ends is reported as a note.
Four ways to say when: the default, after another node, on a cue, and inside a window.

Ids and parts#

An id names a node. Three things use it: { "after": "id" } in a start, a camera focus written "#id", and messages from the check. Two nodes with the same id are a problem.

A component instance takes the id you give it, or one made from its name and a counter (statReveal1). The nodes inside it are named instance.part, for example statReveal1.value.

The ids inside a component's tree are its parts. parts on an instance restyles them or adds motion to them. A part takes the props of the element it is, plus motion. root is the whole component.

json
{ "el": "StatReveal", "value": 82, "suffix": "%",
  "parts": {
    "value": { "color": "bad" },
    "label": { "upper": true, "motion": [{ "do": "loop", "kind": "pulse" }] }
  } }

A part name the component does not have is a problem, and the message lists the parts it does have. npx tsx cli.ts catalog StatReveal prints a component's parts and what element each one is. The component pages list them too.

Reelify Motion Kit 0.1 preview. Built 2026-11-21.llms.txt · SKILL.md · 109 pages