Multistep Form
Info
Repo to run this youself
https://github.com/amarneethi/aidesignsetupdesignsystemprojects.git
Claude Projects
Output
Contents of the project setup in Claude chat
Prompt history
_Chat History — Employee Onboarding Form Session
_Turn 1
_👤 User Input
Create a multi-step employee onboarding form using the design system
_Turn 2
_🤖 Assistant Output
Created a multi-step employee onboarding form (OnboardingForm.jsx) using the design system. The form spans 4 steps:
Step 1 — Personal Info Avatar with initials preview, name/email/phone, pronouns selector, LinkedIn, start date, and office location.
Step 2 — Role & Team Job title, department, employment type, direct manager, team description, and a remote work toggle. Includes a contextual info notification based on the selected department.
Step 3 — Access & Tools Access level dropdown (with a warning for elevated/admin), laptop preference, an interactive tool grid organized by category (Communication, Design, Dev, etc.), and agreement checkboxes with inline validation.
Step 4 — Review A clean summary of all entered data in labeled sections with Tag badges for selected tools, before final submission.
Other highlights:
- Animated step progress indicator with fill, active glow, and completion states
- Per-field validation on each "Continue" click with error messages
- Loading spinner on submit, then a celebratory success screen with "What happens next" steps
- Fully uses design system tokens — themes (light/dark/high-contrast) work automatically
_Turn 3
_👤 User Input
Create a markdown version of this chat history without the code generated. Clearly mark user/system input and output
_Turn 4
_🤖 Assistant Output
(This document)
Created a .md file summarising the full conversation, excluding generated code, with clearly labelled User Input and Assistant Output sections for each turn.
Claude Code
Output
Prompt history
_Chat History: Multi-Step Employee Onboarding Form
_User (Prompt)
Create a multi-step employee onboarding form using the design system
_Assistant (Plan Mode - Phase 1: Exploration)
Read the existing empty src/app/multistepform/page.js file and launched an Explore agent to understand the codebase.
_Explore Agent Findings
- Framework: Next.js 16 with App Router, React 19, Tailwind CSS 4, Lucide React icons
- 21 production-ready components available including: Button, TextInput, Select, Checkbox, Toggle, DatePicker, Tag, Notification, Modal, DataTable, Tabs, Header, SideNav, Breadcrumb, Search, Pagination, and more
- Form utilities: Form, FormGroup (fieldset with legend), FormRow (2-column grid), FormActions (button footer)
- Design tokens: Full set of CSS custom properties for colors, spacing, typography, sizing, shadows, motion, z-index
- Theming: Light, dark, and high-contrast themes via
data-themeattribute - Project structure: Components in
src/components/, tokens insrc/tokens/tokens.css, barrel export viasrc/components/index.js
_Assistant (Phase 1 continued)
Read the key component files to understand exact APIs:
- Form/Form.js — Form wraps with
onSubmit(autopreventDefault), FormGroup takeslegend, FormRow is 2-col grid, FormActions takesalign - TextInput — props:
label,errorText,successText,helperText,required,icon,size - Select — props:
label,options(array of{value, label}),value,onChange(DOM event),errorText,required - Checkbox — props:
label,checked,onChange(DOM event),size - Toggle — props:
label,checked,onChange(DOM event),size - DatePicker — props:
label,value,onChange(receives formatted string, not event),min,max,errorText,required - Button — variants: primary/secondary/tertiary/danger/ghost; props:
loading,icon,iconPosition,fullWidth,type - Notification — props:
type(info/success/warning/error),title,children,dismissible
_Assistant (Phase 2: Design)
Launched a Plan agent to design the implementation. The agent produced a detailed plan covering:
- Single-file implementation in
page.js - 4 steps: Personal Info, Employment Details, IT & Access, Review & Submit
- State management:
useStateforcurrentStep,formData(flat object),errors,submitted - Step indicator: Custom horizontal stepper using design token circles + connector lines
- Validation: Per-step required field validation before allowing navigation
- Navigation: Back (tertiary) / Next (primary) / Submit buttons via FormActions
- Success state: Notification + summary card + reset button
_Assistant (Phase 3 & 4: Final Plan)
Wrote the final plan to /Users/amarneethi/.claude/plans/misty-stargazing-anchor.md and exited plan mode.
_Plan Summary
Target file: src/app/multistepform/page.js
Step 1 — Personal Info: firstName, lastName (required), email (required + format validation), phone, dateOfBirth (required), address — using FormRow pairs
Step 2 — Employment Details: department (Select, required), jobTitle (required), employmentType (Select, required), startDate (DatePicker, required, min=today), manager (required), location (Select, required)
Step 3 — IT & Access: needsLaptop (Toggle) + conditional laptopPreference (Select), needsPhone (Toggle), vpnAccess (Toggle), software checkboxes (Slack, Jira, Figma, GitHub, Google Workspace, AWS Console), email distro checkboxes
Step 4 — Review & Submit: Read-only summary, Tags for selections, info Notification, agreedToPolicy Checkbox (required)
Success State: Success Notification, summary card, "Start New Onboarding" button
_User
(Approved the plan)
_Assistant (Implementation)
Implemented the full multi-step onboarding form in src/app/multistepform/page.js.
_Components used
Button, TextInput, Select, Checkbox, Toggle, DatePicker, Tag, Notification, Form, FormGroup, FormRow, FormActions
_Icons used
Check, ChevronRight, ChevronLeft, UserPlus (from lucide-react)
_Internal structure
StepIndicator— custom stepper with completed/active/upcoming visual statesPersonalInfoStep— personal details form fieldsEmploymentStep— job/department form fieldsITAccessStep— equipment toggles, software checkboxes, distro checkboxesReviewField— label/value display helperReviewStep— read-only summary with Tags and confirmation checkboxSuccessState— completion notification and summary cardOnboardingForm— main component with state management, validation, and navigation
_Build verification
Ran npm run build — compiled successfully with no errors. Route /multistepform generated as static content.
_Final result
A fully functional 4-step employee onboarding form at /multistepform featuring:
- Step indicator with visual progress
- Per-step validation with inline error messages
- Conditional fields (laptop preference shown only when laptop toggle is on)
- Review step with Tag components for selected items
- Success state with reset capability
- Full design system token usage for consistent theming