Latest version 6 of react-hook-form
npm install react-hook-form-6Performant, flexible and extensible forms with easy to use validation.




English | 繁中 | 简中 | 日本語 | 한국어 | Français | Italiano | Português | Español | Русский | Deutsch | Türkçe
- Built with performance and DX in mind
- Embrace native form validation
- Simple integration with UI libraries
- Tiny size without any dependency
- Follows HTML standard for validation
- Resolvers support Yup, Zod, Superstruct, Joi or custom
- Build forms quickly with Form Builder
npm install react-hook-form
- Motivation
- Video tutorial
- Get started
- API
- Examples
- Demo
- Form Builder
- FAQs
``jsx
import React from 'react';
import { useForm } from 'react-hook-form';
function App() {
const { register, handleSubmit, errors } = useForm(); // initialize the hook
const onSubmit = (data) => {
console.log(data);
};
return (
Thanks go to these kind and lovely sponsors (company and individuals)!
> src="https://avatars1.githubusercontent.com/u/42376060?s=60&v=4"
width="40"
height="40"
alt="@sayav"
/>
> src="https://avatars1.githubusercontent.com/u/35668113?s=60&v=4"
width="40"
height="40"
alt="@lemcii"
/>
> src="https://avatars0.githubusercontent.com/u/5726140?s=460&u=b300a6fa08a24c59b9db6ebf246384cf8b16a140&v=4"
width="40"
height="40"
alt="@washingtonsoares"
/>
> src="https://avatars0.githubusercontent.com/u/4017964?s=460&u=3a3fdffeb97749d7509d9c5e9be2cafcb98e426f&v=4"
width="40"
height="40"
alt="@lixunn"
/>
> src="https://avatars2.githubusercontent.com/u/3655410?s=60&v=4"
width="40"
height="40"
alt="@SamSamskies"
/>
> src="https://avatars2.githubusercontent.com/u/3356720?s=60&v=4"
width="40"
height="40"
alt="@peaonunes"
/>
> src="https://avatars2.githubusercontent.com/u/609452?s=60&v=4"
width="40"
height="40"
alt="@wilhelmeek"
/>
> src="https://avatars2.githubusercontent.com/u/279251?s=60&v=4"
width="40"
height="40"
alt="@iwarner"
/>
> src="https://avatars2.githubusercontent.com/u/10728145?s=60&v=4"
width="40"
height="40"
alt="@joejknowles"
/>
> src="https://avatars0.githubusercontent.com/u/5763108?s=60&v=4"
width="40"
height="40"
alt="@chris-gunawardena"
/>
> src="https://avatars1.githubusercontent.com/u/2625371?s=60&v=4"
width="40"
height="40"
alt="@Tymek"
/>
> src="https://avatars0.githubusercontent.com/u/2098777?s=60&v=4"
width="40"
height="40"
alt="@Luchanso"
/>
> src="https://avatars1.githubusercontent.com/u/1541093?s=60&v=4"
width="40"
height="40"
alt="@vcarel"
/>
> src="https://avatars0.githubusercontent.com/u/1481077?s=60&v=4"
width="40"
height="40"
alt="@gragland"
/>
> src="https://avatars2.githubusercontent.com/u/1254942?s=60&v=4"
width="40"
height="40"
alt="@tjshipe"
/>
> src="https://avatars1.githubusercontent.com/u/1087002?s=60&v=4"
width="40"
height="40"
alt="@krnlde"
/>
> src="https://avatars2.githubusercontent.com/u/784953?s=60&v=4"
width="40"
height="40"
alt="@msutkowski"
/>
> src="https://avatars3.githubusercontent.com/u/599247?s=60&v=4"
width="40"
height="40"
alt="@mlukaszczyk"
/>
> src="https://avatars0.githubusercontent.com/u/2566818?s=460&u=754ee26b96e321ff28dbc4a2744132015f534fe0&v=4"
width="40"
height="40"
/>
> src="https://avatars3.githubusercontent.com/u/32602795?s=460&u=6a0c4dbe23c4f9a5628dc8867842b75989ecc4aa&v=4"
width="40"
height="40"
/>
> src="https://avatars0.githubusercontent.com/u/10023615?s=460&u=3ec1e4ba991699762fd22a9d9ef47a0599f937dc&v=4"
width="40"
height="40"
/>
> src="https://avatars3.githubusercontent.com/u/10325111?s=400&u=f60c932f81d95a60f77f5c7f2eab4590e07c29af&v=4"
width="40"
height="40"
/>
> src="https://avatars3.githubusercontent.com/u/44457064?s=460&u=a55119c84e0167f6a3f830dbad3133b28f0c0a8f&v=4"
width="40"
height="40"
/>
Thanks go to all our backers! [Become a backer].
Thanks go to these wonderful organizations! [Contribute].
Thanks go to these wonderful people! [Become a contributor].