{"id":4487,"url":"https://github.com/react-hook-form/react-hook-form","last_synced_at":"2025-05-12T14:51:43.431Z","repository":{"id":37270277,"uuid":"174038031","full_name":"react-hook-form/react-hook-form","owner":"react-hook-form","description":"📋 React Hooks for form state management and validation (Web + React Native)","archived":false,"fork":false,"pushed_at":"2025-05-03T22:41:38.000Z","size":29294,"stargazers_count":43008,"open_issues_count":92,"forks_count":2172,"subscribers_count":174,"default_branch":"master","last_synced_at":"2025-05-05T13:56:03.993Z","etag":null,"topics":["dx","form-builder","forms","react-hooks","react-native","reactjs","typescript","ux","validation"],"latest_commit_sha":null,"homepage":"https://react-hook-form.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-hook-form.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["bluebill1049","jorisre","kotarella1110","Moshyfawn"],"open_collective":"react-hook-form","custom":"https://youtube.com/@bluebill1049"}},"created_at":"2019-03-05T23:47:10.000Z","updated_at":"2025-05-05T13:12:51.000Z","dependencies_parsed_at":"2024-02-06T12:55:55.528Z","dependency_job_id":"306d07c3-eff8-4a81-9fe1-81e99b236858","html_url":"https://github.com/react-hook-form/react-hook-form","commit_stats":{"total_commits":3657,"total_committers":324,"mean_commits":"11.287037037037036","dds":"0.18922614164615803","last_synced_commit":"445a09c3b864a784a9da93c7863c3bea49347f67"},"previous_names":["bluebill1049/react-forme","bluebill1049/react-hook-form"],"tags_count":721,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-hook-form%2Freact-hook-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-hook-form%2Freact-hook-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-hook-form%2Freact-hook-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-hook-form%2Freact-hook-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-hook-form","download_url":"https://codeload.github.com/react-hook-form/react-hook-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252601577,"owners_count":21774656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dx","form-builder","forms","react-hooks","react-native","reactjs","typescript","ux","validation"],"created_at":"2024-01-05T20:17:14.073Z","updated_at":"2025-05-12T14:51:43.420Z","avatar_url":"https://github.com/react-hook-form.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n        \u003ca href=\"https://react-hook-form.com\" title=\"React Hook Form - Simple React forms validation\"\u003e\n            \u003cimg src=\"https://raw.githubusercontent.com/react-hook-form/react-hook-form/master/docs/logo.png\" alt=\"React Hook Form Logo - React hook custom hook for form validation\" /\u003e\n        \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![npm downloads](https://img.shields.io/npm/dm/react-hook-form.svg?style=for-the-badge)](https://www.npmjs.com/package/react-hook-form)\n[![npm](https://img.shields.io/npm/dt/react-hook-form.svg?style=for-the-badge)](https://www.npmjs.com/package/react-hook-form)\n[![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)\n[![Discord](https://img.shields.io/discord/754891658327359538.svg?style=for-the-badge\u0026label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/yYv7GZ8)\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://react-hook-form.com/get-started\"\u003eGet started\u003c/a\u003e | \n  \u003ca href=\"https://react-hook-form.com/docs\"\u003eAPI\u003c/a\u003e |\n  \u003ca href=\"https://react-hook-form.com/form-builder\"\u003eForm Builder\u003c/a\u003e |\n  \u003ca href=\"https://react-hook-form.com/faqs\"\u003eFAQs\u003c/a\u003e |\n  \u003ca href=\"https://github.com/react-hook-form/react-hook-form/tree/master/examples\"\u003eExamples\u003c/a\u003e\n\u003c/p\u003e\n\n### Features\n\n- Built with performance, UX and DX in mind\n- Embraces native HTML form [validation](https://react-hook-form.com/get-started#Applyvalidation)\n- Out of the box integration with [UI libraries](https://codesandbox.io/s/react-hook-form-v7-controller-5h1q5)\n- [Small size](https://bundlephobia.com/result?p=react-hook-form@latest) and no [dependencies](./package.json)\n- 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)\n\n### Install\n\n    npm install react-hook-form\n\n### Quickstart\n\n```jsx\nimport { useForm } from 'react-hook-form';\n\nfunction App() {\n  const {\n    register,\n    handleSubmit,\n    formState: { errors },\n  } = useForm();\n\n  return (\n    \u003cform onSubmit={handleSubmit((data) =\u003e console.log(data))}\u003e\n      \u003cinput {...register('firstName')} /\u003e\n      \u003cinput {...register('lastName', { required: true })} /\u003e\n      {errors.lastName \u0026\u0026 \u003cp\u003eLast name is required.\u003c/p\u003e}\n      \u003cinput {...register('age', { pattern: /\\d+/ })} /\u003e\n      {errors.age \u0026\u0026 \u003cp\u003ePlease enter number for age.\u003c/p\u003e}\n      \u003cinput type=\"submit\" /\u003e\n    \u003c/form\u003e\n  );\n}\n```\n\n### Sponsors\n\nWe’re incredibly grateful to these kind and generous sponsors for their support!\n\n\u003ca target=\"_blank\" href=\"https://www.follower24.de/\"\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/follower24/avatar/256.png?height=256\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href='https://workleap.com/'\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/workleap/db82f38/logo/256.png?height=256\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href='https://www.sgkb.ch/'\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/st-galler-kantonalbank-ag/bfdd17f/logo/256.png?height=256\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href='https://www.sanity.io/'\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/sanity_io/558f87f/logo/256.png?height=256\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href='https://route4me.com/'\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/route4me/71fb6fa/avatar/256.png?height=256\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href='https://twicsy.com/'\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/buy-instagram-followers-twicsy/b4c5d7f/logo/256.png?height=256\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href='https://toss.im'\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/toss/3ed69b3/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href='https://principal.com/about-us'\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/principal/431e690/logo/256.png?height=256\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://graphcms.com\"\u003e\n    \u003cimg width=\"120\" src=\"https://avatars.githubusercontent.com/u/31031438\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://www.beekai.com/\"\u003e\n    \u003cimg width=\"120\" src=\"https://www.beekai.com/marketing/logo/logo.svg\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://kanamekey.com\"\u003e\n    \u003cimg width=\"120\" src=\"https://images.opencollective.com/kaname/d15fd98/logo/256.png\" /\u003e\n\u003c/a\u003e\n\n### Past Sponsors\n\nThank you to our previous sponsors for your generous support!\n\n\u003ca href=\"https://www.leniolabs.com/\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://images.opencollective.com/leniolabs_/63e9b6e/logo/256.png\" width=\"24\" height=\"24\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://underbelly.is\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/underbelly/989a4a6/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://feathery.io\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/feathery1/c29b0a1/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://getform.io\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/getformio2/3c978c8/avatar/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://marmelab.com/\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://images.opencollective.com/marmelab/d7fd82f/logo/256.png\" width=\"24\" height=\"24\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://formcarry.com/\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/formcarry/a40a4ea/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://fabform.io\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/fabform/2834037/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://www.thinkmill.com.au/\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/thinkmill/28910ec/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://kwork.studio/\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/knowledge-work/f91b72d/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://fiberplane.com/\"\u003e\n    \u003cimg width=\"24\" src=\"https://avatars.githubusercontent.com/u/61152955?s=200\u0026v=4\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://www.jetbrains.com/\"\u003e\n    \u003cimg width=\"24\" src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://www.mirakl.com/\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/mirakl/0b191f0/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href='https://wantedlyinc.com'\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/wantedly/d94e44e/logo/256.png\" /\u003e\n\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://www.casinoreviews.net/\"\u003e\n    \u003cimg width=\"24\" src=\"https://images.opencollective.com/casinoreviews/f0877d1/logo/256.png\" /\u003e\n\u003c/a\u003e\n\n### Backers\n\nThanks go to all our backers! [[Become a backer](https://opencollective.com/react-hook-form#backer)].\n\n\u003ca href=\"https://opencollective.com/react-hook-form#backers\"\u003e\n    \u003cimg src=\"https://opencollective.com/react-hook-form/backers.svg?width=950\" /\u003e\n\u003c/a\u003e\n\n### Contributors\n\nThanks go to these wonderful people! [[Become a contributor](CONTRIBUTING.md)].\n\n\u003ca href=\"https://github.com/react-hook-form/react-hook-form/graphs/contributors\"\u003e\n  \u003cimg src=\"https://opencollective.com/react-hook-form/contributors.svg?width=890\u0026button=false\" /\u003e\n\u003c/a\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003ca href=\"https://ui.dev/bytes/?r=bill\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/react-hook-form/react-hook-form/master/docs/ads-1.jpeg\" /\u003e\n\u003c/a\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003eDocumentation website supported and backed by \u003ca href=\"https://vercel.com\"\u003e\u003cb\u003eVercel\u003c/b\u003e\u003c/a\u003e\u003c/p\u003e\n","funding_links":["https://github.com/sponsors/bluebill1049","https://github.com/sponsors/jorisre","https://github.com/sponsors/kotarella1110","https://github.com/sponsors/Moshyfawn","https://opencollective.com/react-hook-form","https://youtube.com/@bluebill1049"],"categories":["Frontend","TypeScript","八、表单处理与验证","Code Design","UI Components","Typescript / Javascript","Uncategorized","Components","React 相关","表单（Forms）","目录","语言资源库","Input Components","Miscellaneous","前端开发框架及项目","react-native","typescript","Forms","Projects Using Zod","Libraries","📖 Categories","React","React [🔝](#readme)","Packages"],"sub_categories":["3.  Immutable 工具（辅助状态管理）","Form Logic","Form Components","Uncategorized","Forms","typescript","Syntax highlighting","其他_文本生成、文本对话","Form Validation","React Forms","Form","Forms \u0026 Inputs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-hook-form%2Freact-hook-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-hook-form%2Freact-hook-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-hook-form%2Freact-hook-form/lists"}