Performant, flexible and extensible forms with easy to use validation.
🇦🇺English | 🇷🇺Русский | 🇨🇳 简体中文 | 🇯🇵 日本語 | 🇰🇷한국어 | 🇫🇷Français | 🇮🇹Italiano | 🇧🇷Português | 🇪🇸Español
- Built with performance and DX in mind
- Embrace uncontrolled form validation
- Improve controlled form's performance
- Tiny size without any dependency
- Follows HTML standard for validation
- Compatible with React Native
- Supports Yup schema-based validation
- Supports native browser validation
- Build forms quickly with the form builder
$ npm install react-hook-form
importReactfrom'react';import{useForm}from'react-hook-form';functionApp(){const{ register, handleSubmit, errors }=useForm();// initialise the hookconstonSubmit=data=>{console.log(data);};return(<formonSubmit={handleSubmit(onSubmit)}><inputname="firstname"ref={register}/>{/* register an input */}<inputname="lastname"ref={register({required: true})}/>{errors.lastname&&'Last name is required.'}<inputname="age"ref={register({pattern: /\d+/})}/>{errors.age&&'Please enter number for age.'}<inputtype="submit"/></form>);}Thanks goes to all our backers! [Become a backer].
Thanks goes to these wonderful people. [Become a contributor].

