Make me a website that shows a form with alternative branching and decision making to…
- User
Make me a website that shows a form with alternative branching and decision making to reach a final pricing
Assistant
Make me a website that shows a form with alternative branching and decision making to reach a final pricing
I'll create a website with a multi-step branching form that leads to final pricing. This is like a "quote calculator" with decision trees. Let me start by exploring the project structure.
Let me check the utils and CSS setup.
Now I understand the setup. I'll build a branching pricing calculator. My plan:
Let me build a "Web Studio Project Quote" calculator where answers branch to different follow-up questions (e.g., choosing "E-commerce" asks about products, choosing "Blog" asks about articles), leading to a dynamically computed price.
Let me start by updating the title and creating the flow configuration.
Now the flow configuration file — the heart of the branching logic. This defines a decision tree where each step's options can lead to different next steps and carry pricing impacts.
Now let me create the pricing engine hook that manages the branching navigation and computes totals.
Now the main App component with the polished UI. I'll build it with a two-panel layout: the branching question flow on the left and a live pricing summary on the right.
Let me remove the unused import.
Now let me add the fadeIn keyframe animation to the CSS, then build.
The project builds successfully. Here's what I created:
A dark, polished wizard where each answer routes you down a different set of follow-up questions, converging on a final custom quote.
The logic lives in src/flow.ts as a decision tree. The root question ("What are we building?") sends you down one of four completely different paths:
All paths then converge on shared add-ons and timeline steps. Each option can add a one-time price and/or a monthly fee, and options can override which step comes next — that's what creates the alternative branches.
src/useQuoteFlow.ts — the engine: tracks visited-step history, handles single-choice branching vs. multi-select (checkbox) accumulation, computes one-time + monthly totals, and applies a rush-timeline multiplier (+25% for under 4 weeks).Try selecting different first options to see how the questions — and the final price — change completely.
Files built: index.html, src/flow.ts, src/useQuoteFlow.ts, src/App.tsx, src/index.css