Reelify Motion Kit 0.1 preview
Docs/Guide

Design systems

The config record that gives a film its colours, typefaces, surfaces and springs, how withConfig and mergeConfigs apply it, and why a film never writes a colour.

A design system is a config record: everything a brand decides once, kept apart from any one scene. A scene names things ("accent", "card", "punchy", "display"). The config says what those names are. The same scene under another config is another brand's video.

A config has the same shape as a scene's own kit fields. It is those fields lifted out into one object.

The config record#

FieldHoldsExample
name, blurbWhat it is called and one line about it."Graphite"
paletteColour names to values.{ "ground": "#0B0C0E", "accent": "#8B9BFF" }
fontsThe CSS family behind each font role.{ "display": "Geist, sans-serif" }
typefacesOne font role remapped to another.{ "display": "mono" }
surfacesNamed box styles.{ "card": { "fill": "paper", "radius": 22, "pad": 34 } }
curvesNamed curves.{ "punchy": { "spring": { "bounce": 0.18, "duration": 0.5 } } }
posesNamed poses.{ "rise": { "y": 30, "opacity": 0, "blur": 8 } }
tokensNamed numbers, words, lists and records.{ "gap": 24, "corner": 28, "beat": 0.4 }
defaultsDefault props per component.{ "KineticLine": { "from": "blur" } }
components, behaviorsThe brand's own components and behaviors, as data.See Custom components.
speed, backgroundThe scene fields of the same name.1.2, "ground"

Palette#

Twelve names always exist: ink, paper, ground, accent, accent2, onAccent, muted, good, bad, night, white, black. A config overrides the ones it lists and may add its own. In a fill, "accent>night" is a gradient between two names.

The names are roles. ground is the frame's background. paper is the fill of cards. ink is text on either. muted is quiet text. accent and accent2 are the brand's colours. onAccent is text on accent.

Fonts and font roles#

A text says which role it is: "font": "display", "body", "mono" or "serif". fonts maps a role to a CSS font family. typefaces points one role at another, which turns every headline monospace without naming a typeface. The renderer's own fonts argument fills any role the config leaves out.

The kit does not load font files. fonts holds CSS family names. The page that mounts the scene must have those families available.

Surfaces#

A surface is a named box style. A box with "surface": "card" takes that surface's props wherever it did not set them itself. Components say which surface they sit on and leave fill and corner to it, so one entry restyles every card in a film.

A surface can set any box prop: fill, border, borderW, radius, pad, shadow, hard, frost, glow, pattern. Twelve names are built in:

SurfaceWhat it means until a config says otherwise
card{"fill": "paper", "radius": 40, "pad": 44, "shadow": 2}
pill{"fill": "accent", "radius": 999, "pad": [18, 40]}
glass{"fill": "rgba(255,255,255,.14)", "frost": 22, "border": "rgba(255,255,255,.3)", "borderW": 2, "radius": 40, "pad": 44}
outline{"border": "ink", "borderW": 4, "radius": 40, "pad": 44}
chip{"fill": "paper", "radius": 999, "pad": [18, 36], "shadow": 2}
slab{"fill": "accent", "radius": 36, "pad": [26, 44], "shadow": 2}
toast{"fill": "rgba(70,8,16,.86)", "radius": 999, "pad": [16, 30], "glow": "rgba(240,68,95,.35)"}
page{"fill": "ground", "pad": 90}
board{"fill": "transparent", "pad": 24}
panel{"fill": "paper", "radius": 28, "pad": 36, "shadow": 3}
key{"fill": "paper", "border": "muted", "borderW": 3, "radius": 22, "shadow": 1}
caption{"fill": "rgba(8,10,12,.78)", "radius": 18, "pad": [22, 34]}

A config's entry replaces the built-in entry of that name whole. It is not merged with it, so write every prop the surface needs. A config can add names of its own. A surface name that does not exist is a problem, and the message lists the ones that do. "surface": "none" takes no style.

Curves and poses#

curves and poses add names or redefine built-in ones. Redefining "punchy" changes every behavior in every component that asks for "punchy". This is how a system with no bounce and a system where everything springs can play the same film. See Behaviors for the built-in names.

Tokens#

Tokens are named values read as "$gap", inside "=gap*2", or as "{name}" in text, at any depth. A design system uses them for spacing steps, corner sizes and beat lengths. A product record uses them for words. See Films.

Defaults#

defaults sets props per component. The key "*" applies to every component that has the prop. A value is resolved in this order, last wins: the component's own default, defaults["*"], defaults[Component], the props on the instance.

One scene, two systems#

The two scenes below have the same root and the same tokens. The first carries no kit fields and gets the built-in look.

The built-in palette, surfaces and curves.

The second adds five kit fields. Nothing under root changed.

A dark palette, square surfaces with outlines, the mono role for headlines, and two curves redefined so nothing bounces.

The five systems#

The kit ships five design systems for product films, exported as SYSTEMS. Each gives a value to every name the example films use.

SystemPaletteDisplay faceCharacter
reelifyGeistThe app's own: off-white, ink, one blue, calm springs.
graphiteGeistNear-black, cool grey, a soft violet. Precise, no bounce.
paperInstrument SerifCream paper, ink, a brick red. A serif for the big lines, slow settles.
neonUnboundedBlack, lime and pink, wide heavy type, everything springs.
candyNunitoSoft pinks and violet, round everything, friendly bounce.

A system is about 1,100 characters of JSON. The same five are in the agent kit as files to copy: kit/r/system-reelify.json, system-graphite.json, system-paper.json, system-neon.json, system-candy.json. Try them on a film in the films playground.

withConfig#

ts
import { SYSTEMS, compile, starter, withConfig } from "./motion-kit/src/index";

const dressed = withConfig(film, SYSTEMS.graphite, { force: true });
const compiled = compile(dressed, starter());

withConfig(spec, config) returns a new scene with the config under it. Maps (palette, fonts, typefaces, tokens, surfaces, curves, poses) are merged key by key. defaults are merged per component. components and behaviors are merged by name.

CallWho wins a clashUse it for
withConfig(spec, config)The scene's own kit fields.A house style that a scene may override.
withConfig(spec, config, { force: true })The config.Re-skinning a written scene without touching it.

The CLI does the forced form: npx tsx cli.ts dress film.json graphite prints the film under that system.

force lets the config win, and it also overrides tokens the config defines. The shipped systems define no tokens, so a film's product words survive a re-skin.

mergeConfigs#

ts
import { defineConfig, mergeConfigs } from "./motion-kit/src/index";

const house = defineConfig({ name: "House", tokens: { gap: 24, corner: 36 } });
const brand = defineConfig({ name: "Brand", palette: { accent: "#C8452D" }, tokens: { corner: 6 } });
const config = mergeConfigs(house, brand);   // corner is 6, gap is 24

mergeConfigs(...configs) folds several configs into one, later ones on top. Layer a house config, then a skill's, then a brand's. defineConfig returns its argument and exists for type checking.

Why a film never writes a colour#

A film that writes "#3D5AFE" can only ever be that brand's film. A film that writes "accent" can be re-skinned by swapping one record of about 1,100 characters. The same holds for typefaces (roles, not families), corners and padding (surfaces, not numbers on each box) and springs (curve names, not spring constants).

Rules for a film that should survive a re-skin:

  • A colour is a palette name. Never a colour value.
  • A typeface is a font role. Never a family name.
  • A box that looks like a card sits on a surface. It does not set fill and radius itself.
  • A curve is a name. A custom spring belongs in the config's curves.
  • Text on accent uses onAccent. Text on ground or paper uses ink or muted. Check contrast after a re-skin: the compile check does not measure it.
Reelify Motion Kit 0.1 preview. Built 2026-11-21.llms.txt · SKILL.md · 109 pages