Reference
Schema reference
Every field of the Comic Strip Document, generated from the published JSON Schema.
The tables below are generated at build time from @toonstrip/schema’s schema.json
(draft-07, additionalProperties: false throughout). Field names, types, and required-ness
come from the schema; the one-line descriptions are maintained on this site.
Note
The TypeScript types are exported from @toonstrip/schema as ComicStripDocument,
Panel, Body, Line, Emotion, CameraPreset, and BalloonKind. The JSON Schema is
the authoritative machine-checkable version for non-TypeScript producers.
ComicStripDocument
| Field | Type | Required | Description |
|---|---|---|---|
version | 1 | yes | Document format version. Always 1 for now. |
panels | Panel[] | yes | The strip, in reading order. |
CameraPreset
One of: "reaction", "establishing", "wide", "close-up", "over-shoulder", "medium"
BalloonKind
One of: "speech", "thought", "caption"
Emotion
| Field | Type | Required | Description |
|---|---|---|---|
angle | number | yes | Radians around the wheel. 0 is HAPPY; each named emotion is π/4 further. |
intensity | number | yes | 0 to 1. 0 is NEUTRAL regardless of angle. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
character | string | yes | Id of a character declared by a registered pack. |
emotion | Emotion | yes | Point on the emotion wheel that picks the face. |
pose | "wave" | "point" | "shrug" | no | Gesture that claims the torso independently of the face. |
requested | boolean | no | Keep the body on stage even when it has no line this panel. Defaults to true for bodies with a line. |
Line
| Field | Type | Required | Description |
|---|---|---|---|
speaker | string | yes | A body's character id, or "caption" for the bodiless caption channel. |
balloon | BalloonKind | yes | Balloon shape. A caption speaker must use "caption". |
text | string | yes | The words. Wrapped by the renderer; keep it short. |
Panel
| Field | Type | Required | Description |
|---|---|---|---|
backdrop | string | yes | Id of a backdrop declared by a registered pack. An unknown id is a load-time error. |
roomTitle | string | no | Optional banner text drawn in the panel's top-left, like a location caption. |
dark | boolean | no | Paint the panel black and omit the figures. Balloons still draw. |
camera | CameraPreset | no | Framing preset. Defaults to "medium". |
bodies | Body[] | yes | Who is on stage, left to right. |
speakers | Line[] | yes | Balloons, in draw order: the caption first, then each speaking body. |