Skip to content

multi-step forms in Next JS using react-hook-form and zod validation along with shadcn ui components

Notifications You must be signed in to change notification settings

arifshariati/multi-step-form

Repository files navigation

multi-step form

This repo produces multi-step form which aims to be more generic, reusable, strictly typed and implement zod validation with react-hook-form.

Whenever you encounter multi-step form, irrespective of the styles, there are many ways to accomplish it. In this repo we are going to use react's context api that is wrapped around the multi-step form enabling state data across the sub-components of the multi-step form.

so, essentially we need form default values, zod scheme and form details out of react-hook-form.

Enjoy working with multi-step form.