-
Notifications
You must be signed in to change notification settings - Fork 0
JSON Flow Format
ChiefVenzox edited this page Jun 5, 2026
·
1 revision
A NotebookFlowKit JSON file contains a flow name and an ordered list of screens.
{
"name": "StarterFlow",
"screens": []
}{
"name": "StarterFlow",
"screens": [
{
"id": "welcome",
"type": "text",
"title": "Welcome",
"subtitle": "Let's personalize your app",
"next": "goal"
},
{
"id": "goal",
"type": "choice",
"title": "What is your goal?",
"options": ["Focus", "Fitness", "Learning"],
"next": "name"
},
{
"id": "name",
"type": "input",
"title": "What should we call you?",
"next": "done"
},
{
"id": "done",
"type": "completion",
"title": "You're ready",
"subtitle": "Your setup is complete"
}
]
}| Field | Type | Required | Description |
|---|---|---|---|
id |
String | Yes | Unique screen identifier. |
type |
String | Yes | Screen type. |
title |
String | Yes | Main title shown on the screen. |
subtitle |
String | No | Secondary text shown below the title. |
options |
Array | For choice screens | Available options for choice and multi-choice screens. |
placeholder |
String | No | Placeholder for input screens. |
next |
String or Object | No | Next screen ID or conditional route map. |
required |
Boolean | No | Whether the user must answer before continuing. |
{
"id": "welcome",
"type": "text",
"title": "Welcome",
"subtitle": "Let's get started",
"next": "goal"
}{
"id": "goal",
"type": "choice",
"title": "What is your goal?",
"options": ["Focus", "Fitness", "Learning"],
"next": "name"
}{
"id": "topics",
"type": "multiChoice",
"title": "Pick your topics",
"options": ["SwiftUI", "Python", "Design"],
"next": "done"
}{
"id": "name",
"type": "input",
"title": "What should we call you?",
"placeholder": "Your name",
"next": "done"
}{
"id": "done",
"type": "completion",
"title": "You're ready",
"subtitle": "Your setup is complete"
}NotebookFlowKit accepts a few aliases to make JSON authoring friendlier:
| Alias | Normalized Type |
|---|---|
single_choice |
choice |
singlechoice |
choice |
multi_choice |
multiChoice |
multichoice |
multiChoice |
text_input |
input |
textinput |
input |
done |
completion |
The JSON loader validates:
- the flow must contain at least one screen
- screen IDs must be unique
-
nexttargets must point to existing screens - conditional route targets must point to existing screens
-
choiceandmultiChoicescreens must include options