Guide
How to write each part of a prototype, with examples from the app prototype.
A prototype is screens, and how a person moves between them.
It’s written in a small language, with the features most languages have, and nothing particular to one journey:
| Language feature | In a prototype |
|---|---|
| Variables | paths, such as council.parent.name |
| String templates | "Your postcode {{ postcode }}" |
if |
a component’s when |
First match, like switch |
a screen’s next, tried in order |
| Loops | a group’s each, with item and index |
Named values, like let |
derived |
| Logic | all, any, one, not, present, missing, is and contains |
| Lists | lookup and pick to find an item, filter to keep some |
What the app does, such as going to a screen, presenting a sheet or switching tab, is done by actions, as a language calls its platform.
It has no functions, no recursion and no arithmetic, so a prototype always finishes, can be checked against the schema, and is safe to open, whoever wrote it.
Each page here covers one part, with examples taken from the app prototype, which recreates the component library’s own examples.
- Screens: what goes on a screen, and how the library’s components are written in a prototype.
- Moving between screens: buttons, the back button, sheets and tabs.
- Values and conditions: what a person types and chooses, checking it, showing it, and the conditions that decide what happens next.
- Lists and the data bank: looking facts up, and showing and filtering lists of them.
- Timing: screens that go on by themselves, as Chat’s replies arrive.
- Proposed components: using a component the library doesn’t have yet.