⬡ FRAMEWERK
Core

Screens and devices

A screen is one entry with an id and a layout tree; devices are viewport presets that set insets, chrome and $env comparisons.

View as Markdown

Screens and devices

A screen is one entry in screens with a unique id (the target of navigate(id)) and a layout root node; a device is a viewport preset that sets dimensions, safe-area insets and platform chrome without locking the spec to one phone.

Examples

A named screen with a style and device:

A screen with a device
iphone15
SPEC.JSON
RENDERED OUTPUTFRAMEWERK RENDERER
Menu
Espresso · Cortado · Filter
Edit the JSON to update the rendered screen.Edits stay in this preview

Two screens, one navigating to the other, with a desktop preset on the second:

Two screens, two devices
web-lg
SPEC.JSON
RENDERED OUTPUTFRAMEWERK RENDERER
Home
Open dashboard
Edit the JSON to update the rendered screen.Edits stay in this preview

Anatomy

FieldTypeNotes
idstringRequired. Unique; the target of navigate(id).
layoutLayoutNodeThe root node. A screen without one renders nothing.
titlestringHuman label.
summarystringWhat the screen is for: who is on it, the one job they came to do, and what is deliberately not here. Aim for 100 words or fewer.
routestringURL path, for code generation.
stylestringOverrides project.defaultStyle.
devicestringThe preset this screen is designed at; overrides project.defaultDevice.
stateVarsRecord<string, StateVarDef>See State & expressions.
status"draft" | "in-review" | "approved" | "deprecated"Workflow metadata; does not affect rendering.
priority"P0" | "P1" | "P2"Workflow metadata.

Device presets

The renderer ships presets that set viewport dimensions, safe-area insets, and platform chrome:

iphoneSE · iphone15 · ipadMini · ipadPro · mweb · web-sm · web-md · web-lg · web-xl · desktop · auto

Specs are not locked to them — a preset is just a viewport plus insets, and auto fills whatever space the host gives it. Presets matter for two things: safeArea padding resolves against the preset's insets, and $env.device expressions compare against its class (mobile, tablet, desktop). effectiveDevicePreset is the one resolver for screen → project → fallback, the orientation swap and auto's measured width; $env.breakpoint (xs < sm < md < lg < xl, by viewport width) compares by rank, so $env.breakpoint >= md reads naturally.

Stability

Screen fields listed above are part of the format contract in api-report.md. Workflow metadata (status, priority, summary) is validated but does not affect rendering; treat it as provisional for anything beyond authoring tools.