shadcn.io is not affiliated with official shadcn/ui
Branching Paths Stepper Block for Radix UI
A heating-upgrade planner whose step list is rebuilt from a choice between a heat pump and a gas boiler, with a drawn two-lane fork that marks the chosen lane.
Installation
Overview
Show a job that splits in two, with this branching stepper for React with Radix UI. A hairline frame with plus marks holds a drawn fork across the top: a survey and a choice on the trunk, a Heat pump lane and a Gas boiler lane, and a merge at Finalize. Below it a Steps rail lists five numbered steps (Survey, Choose system, two steps of the chosen path, Finalize) beside the open step's panel. The Choose step holds two choice cards with the time each path takes on site; the rail is worked out from the choice, so picking Heat pump gives Ground check and Install, and Gas boiler gives Flue route and Install. Going back and choosing again resets the path steps. "Continue" is the block's one Shine Button and "Send quote" ends on a quote that says it is in this demo. For installers, onboarding flows and any process with a real fork.
FAQ
How does the choice change the steps?
stagesOf(choice) in the file returns the survey, the choice, the chosen path's two steps and Finalize, so the rail always has five steps. Until a system is chosen the two path steps are placeholders that say they follow your choice. Add a third system by adding a card to SYSTEMS and a list of steps to pathOf.
What happens when I change my choice later?
You can go back to Choose system at any time. Picking the other system swaps the two path steps and resets how far you have reached to the choice itself, so you walk the new path from its first step. Picking the same system again changes nothing.
Why does Continue say Choose a system first?
The Choose step cannot be left without a choice. The button is marked aria-disabled rather than disabled, so it keeps its place and stays focusable, and pressing it says what is missing in the status line.
What stays local?
The step, the choice and how far you have reached are component state, lost on reload. Nothing is booked, priced or sent, and "Send quote" ends on "Quote ready in this demo". To make it real, post choice from the advance handler on the last step and load the survey rows from your job record.