I want to build a step form like this with schadcn
I'll create a multi-step employee form based on your design. This will include all the steps shown in your images with proper form controls, validation, and step navigation.
I've created a comprehensive multi-step employee form that matches your design. Here are the key features:
Step Navigation:
Step 1 - Basic Info:
Step 2 - Role & Assignment:
Step 3 - Attendance & Commission:
Step 4 - Review & Submit:
The form uses shadcn/ui components and maintains state across all steps. You can easily extend it by adding validation, API integration, or additional form fields.
I use react hook form with zod valiadation please update the code to be aligned with this
I'll update the code to use React Hook Form with Zod validation. This will provide robust form validation and better form state management.
I've completely updated the form to use React Hook Form with Zod validation. Here are the key improvements:
Zod Validation Schemas:
React Hook Form Integration:
useForm hook with zodResolver for validationFormField components for proper form controlmode: "onChange"Key Features:
FormMessageValidation Rules:
Enhanced UX:
The form now provides robust validation while maintaining the same beautiful UI design from your original mockup.