GOV.UK app prototype schema
Prototype a journey through the GOV.UK app by writing it down as JSON. The viewer draws it with the app’s own components, and you can tap through it in a browser.
Get startedWhat this is
A way to prototype the GOV.UK app without writing code. A prototype is one JSON file: its screens, what is on each, and where each button goes. The viewer checks it against a schema, then runs it, drawing every screen with the GOV.UK app prototype components, so it looks and behaves like the app.
{
"version": "0",
"id": "hello",
"title": "Hello",
"start": "hello",
"screens": {
"hello": {
"components": [
{ "type": "nav-bar", "attributes": { "title": "Hello", "large-title": true } },
{ "type": "text", "text": "This screen is drawn by the component library." }
]
}
}
}
How it works
- Only what the app has. A prototype can use only the library’s components, as the library defines them. The schema is made from the library’s own definitions, so it can’t drift from it.
- Data, not code. Text can show a value, and a screen can show or hide things, but nothing in a prototype is code. It’s safe to open anyone’s.
- Synthetic data. A prototype takes facts, such as which council serves a postcode, from a bank of made-up data, so it behaves like the real thing without anyone’s details.
- It must match the app. Each screen of the app prototype is checked, pixel by pixel, against the library’s hand-written example of it.
Find out more
- Get started: run the viewer and write a first prototype.
- Guide: screens and their components, moving between them, values, lists and timing.
- Reference: every part of the schema.
- Prototypes: open the prototypes in the viewer.