Performant, flexible and extensible forms with easy to use validation.
English | 简体中文 | 日本語 | 한국어 | Français | Italiano | Português | Español | Русский | Deutsch | Türkçe
Features
- Built with performance and DX in mind
- Embrace uncontrolled form validation
- Simple integration with UI libraries
- Tiny size without any dependency
- Follows HTML standard for validation
- Compatible with React Native
- Supports Yup, Joi, Superstruct or custom
- Build forms quickly with the form builder
Install
npm install react-hook-form
Links
Quickstart
import React from 'react';import useForm from 'react-hook-form'; { const register handleSubmit errors = ; // initialise the hook const onSubmit = data console; ; return <form => <input ="firstname" = /> /* register an input */ <input ="lastname" = /> errorslastname && 'Last name is required.' <input ="age" = /> errorsage && 'Please enter number for age.' <input ="submit" /> </form> ;}
Sponsors
Want your logo here? DM on Twitter
Backers
Thanks goes to all our backers! [Become a backer].
Organizations
Thanks goes to these wonderful organizations! [Contribute].
Contributors
Thanks goes to these wonderful people! [Become a contributor].