-
Notifications
You must be signed in to change notification settings - Fork 0
Conditional Navigation
ChiefVenzox edited this page Jun 5, 2026
·
1 revision
NotebookFlowKit supports both linear and answer-based navigation.
Use a string next value to move to a fixed screen.
{
"id": "welcome",
"type": "text",
"title": "Welcome",
"next": "goal"
}Use an object next value to route based on the user's answer.
{
"id": "goal",
"type": "choice",
"title": "What is your goal?",
"options": ["Focus", "Fitness", "Learning"],
"next": {
"Fitness": "fitness_setup",
"Learning": "learning_setup",
"default": "focus_setup"
}
}If the user selects Fitness, the flow advances to fitness_setup.
If the user selects Learning, the flow advances to learning_setup.
If no specific route matches, the default route is used.
For multiChoice screens, NotebookFlowKit checks selected answers in order and uses the first selected option that has a route.
{
"id": "topics",
"type": "multiChoice",
"title": "Pick topics",
"options": ["SwiftUI", "Python", "Design"],
"next": {
"SwiftUI": "swiftui_path",
"Python": "python_path",
"default": "general_path"
}
}Text input screens can also use routes, matching the exact entered text.
{
"id": "access_code",
"type": "input",
"title": "Enter your access code",
"next": {
"BETA": "beta_setup",
"default": "standard_setup"
}
}All route targets are validated by NotebookFlowLoader.
If a route points to a missing screen, loading fails before the flow renders.