Branching Quiz — Quiz Funnels That Route Based on Answers

A branching quiz changes its path depending on what the user answers. In quiz-ui, branching is data-driven: each step can declare a branch array of rules (if answer equals X, go to step Y). Rules evaluate in order; the first match wins; if no rule matches, the step's next fallback is used.

Last updated: 2026-09-25

Frequently asked questions

  • How does branching work in quiz-ui?

    Every step can have a branch array. Each rule has a condition (equals or includes) and a goTo target. The engine evaluates rules against collected answers and routes accordingly.

  • Can branches converge?

    Yes. Multiple branch paths can all point to the same next step — for example, both 'strength' and 'cardio' answers might lead to 'email'.

  • How many branch rules per step?

    No limit. Define as many rules as you need. They're evaluated in array order.