Cursor prompt
Build Multi-Step Form Wizard
Multi-step wizard with per-step validation, progress indicator, back/next navigation, and sessionStorage persistence.
Build a multi-step form wizard for {{project_name}}. ## Purpose: {{form_purpose}} ## Steps: {{steps}} ### Architecture Single-page wizard — no browser navigation between steps. State in React Hook Form with per-step zod schemas. Progress persisted to sessionStorage (survives page refresh). ### Step Configuration ```typescript const STEPS = [ { id: 'personal', title: 'Personal Info', schema: personalSchema }, { id: 'company', title: 'Company', schema: companySchema }, { id: 'review', title: 'Review & Submit', schema: null }, ]; ``` ### Navigation Rules - **Next**: Validate current step fields only → advance if valid - **Back**: Always allow — never validate going backward - **Direct navigation**: Allow clicking completed steps to go back ### Validation - Zod schema per step — validate only current step on Next - Show field-level errors inline, not in toasts - First invalid field receives focus automatically ### State Management - useFormContext shares form state across all step components - Auto-save to sessionStorage on every field change - Restore from sessionStorage on mount ### Progress Indicator - Completed steps: checkmark icon - Current step: active/highlighted - Future steps: muted/locked appearance - Accessible: aria-current="step" on active step ### Review Step Summary of all entered data with edit links. Final submit button disabled while submitting. ### On Success Clear sessionStorage, redirect to confirmation page with brief summary. ### Output WizardProvider, step components, progress indicator, and form submission handler.
Fill in: {{project_name}}, {{form_purpose}}, {{steps}}. In Loopy you fill these in a form and copy the finished prompt in one click.
More ui design prompts
- CursorAdd Dark Mode with CSS VariablesImplement theme switching with CSS custom properties, localStorage persistence, system preference detection, and flash-free loading.
- CursorAdd WCAG Accessibility to UIWCAG 2.1 AA compliance: keyboard navigation, ARIA labels, focus management, color contrast, and screen reader support.
- v0Analytics DashboardData visualization dashboard with KPI cards, charts, data table, and date range filtering.
- v0Blog LayoutClean blog with featured posts, category filters, reading time, and author profiles.
- v0Component from DescriptionStructured prompt to generate a polished React component with proper accessibility, responsiveness, and dark mode support.
- v0Component Library ShowcaseDesign system documentation page showing component variants, usage examples, and code snippets.

