---
name: react-hook-form
summary: "React Hook Form is a performant, dependency-free form library for React that uses uncontrolled inputs and hooks (register, handleSubmit, formState) to minimize re-renders, with built-in HTML validation and schema resolvers for Zod, Yup, Joi, and others."
language: TypeScript
license: MIT
repo: https://github.com/react-hook-form/react-hook-form
source: https://opensources.dev/resource/react-hook-form
health: 100
---

# react-hook-form

React Hook Form is a performant, dependency-free form library for React that uses uncontrolled inputs and hooks (register, handleSubmit, formState) to minimize re-renders, with built-in HTML validation and schema resolvers for Zod, Yup, Joi, and others.

[![npm downloads](https://img.shields.io/npm/dm/react-hook-form.svg?style=for-the-badge)](https://www.npmjs.com/package/react-hook-form)
[![npm](https://img.shields.io/npm/dt/react-hook-form.svg?style=for-the-badge)](https://www.npmjs.com/package/react-hook-form)
[![npm](https://img.shields.io/npm/l/react-hook-form?style=for-the-badge)](https://github.com/react-hook-form/react-hook-form/blob/master/LICENSE)
[![Discord](https://img.shields.io/discord/754891658327359538.svg?style=for-the-badge&label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/yYv7GZ8)

### Features

- Built with performance, UX and DX in mind
- Embraces native HTML form [validation](https://react-hook-form.com/get-started#Applyvalidation)
- Out of the box integration with [UI libraries](https://codesandbox.io/s/react-hook-form-v7-controller-5h1q5)
- [Small size](https://bundlephobia.com/result?p=react-hook-form@latest) and no [dependencies](./package.json)
- Support [Yup](https://github.com/jquense/yup), [Zod](https://github.com/colinhacks/zod), [AJV](https://github.com/ajv-validator/ajv), [Superstruct](https://github.com/ianstormtaylor/superstruct), [Joi](https://github.com/hapijs/joi) and [others](https://github.com/react-hook-form/resolvers)

### Install

```tsx
npm install react-hook-form
```

### Quickstart

```jsx
import { useForm } from 'react-hook-form';

function App() {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm();

  return (
    <form onSubmit={handleSubmit((data) => console.log(data))}>
      <input {...register('firstName')} />
      <input {...register('lastName', { required: true })} />
      {errors.lastName && <p>Last name is required.</p>}
      <input {...register('age', { pattern: /\d+/ })} />
      {errors.age && <p>Please enter number for age.</p>}
      <input type="submit" />
    </form>
  );
}
```

### Sponsors

We’re incredibly grateful to these kind and generous sponsors for their support!

## Major Sponsors

Follower24BuyFans

## Supporting Sponsors

Thanks.devWorkleapKinstaSentNicheTossPrincipalHygraph

### Past Sponsors

Thank you to our previous sponsors for your generous support!

### Backers

Thanks go to all our backers! [[Become a backer](https://opencollective.com/react-hook-form#backer)].

### Contributors

Thanks go to these wonderful people! [[Become a contributor](CONTRIBUTING.md)].
