Forms
React Hook Form + Zod / TanStack Form
React Hook Form + Zod
Lots of people use it, so answers are easy to find when you search. shadcn/ui's forms use this combo too
Compare the result
We built the same thing with each library. Try them out.
Compare the code
Edit the code and the preview on the right updates.
To run this demo in your own project:npx shadcn@latest add button input label
Comparison
As of October 2026
Features
The most popular combo. Just add register to an input to collect its value, and write all your validation rules together with Zod
Best for
The safe default. shadcn/ui's forms are built with this combo too
TanStack Form
Official site ↗Features
A newer library from the same family as TanStack Query. You wrap each input in form.Field. Its type (TypeScript) checking is very detailed
Best for
You want it to match other TanStack libraries. You have many inputs and want types to catch mistakes