Branching Logic Form — Conditional Question Routing in React
Branching logic lets your form adapt to each user. quiz-ui implements it through branch rules on each step: if a previous answer matches a value, jump to a specific step. Rules are serializable, predictable, and isolated from the UI — change the branching without touching a single component.
Last updated: 2026-09-25
Frequently asked questions
Can I skip entire sections based on answers?
Yes. A branch rule can jump to any step in the definition — even one that would otherwise be several steps ahead, effectively skipping the steps in between.
Is there a limit to how deep branching can go?
No. Branches can lead to steps that themselves have branches, creating nested routing. The engine handles any depth.
How do I handle a 'none of the above' branch?
Add a catch-all branch rule (a rule with neither equals nor includes) at the end of the array. If nothing else matches, it fires.