https://github.com/saadbazaz/react-hook-form-ai
React Hook Form, but with AI
https://github.com/saadbazaz/react-hook-form-ai
Last synced: 27 days ago
JSON representation
React Hook Form, but with AI
- Host: GitHub
- URL: https://github.com/saadbazaz/react-hook-form-ai
- Owner: SaadBazaz
- License: mit
- Created: 2025-08-09T11:43:17.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-08-23T14:51:12.000Z (about 1 month ago)
- Last Synced: 2025-08-24T05:24:11.693Z (about 1 month ago)
- Language: TypeScript
- Size: 155 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/react-hook-form-ai)
[](https://www.npmjs.com/package/react-hook-form-ai)
[](https://github.com/SaadBazaz/react-hook-form-ai/blob/master/LICENSE)`react-hook-form-ai` is a wrapper package over [React Hook Form](https://react-hook-form.com/) that integrates AI features such as auto-fill and form summarization using the browser's built-in LLM. This package is designed to be a complete drop-in replacement for React Hook Form while maintaining backward compatibility.
### Features
- **Auto-fill**: Pulls user's auto-fill data from Chrome, prompts user to generate the form with AI.
- **Form Summarization**: Provides a concise overview of the filled form data using AI.
- **Grammar Suggestions**: Suggests grammar fixes in the form
- Uses Chrome's [built-in AI](https://developer.chrome.com/docs/ai/built-in-apis) features as the LLM backend - No need to host any infra!
- If you still want to use another LLM backend, this follows the OpenAI API specification. So you can plug-and-play any backend
- Want to learn more about React-Hook-Form's features? Read their [README](https://github.com/react-hook-form/react-hook-form#features).### Install
```bash
npm install react-hook-form-ai
```### Quickstart
```jsx
import { useForm } from 'react-hook-form-ai'; // <- Notice how only the import changes!function App() {
const {
register,
handleSubmit,
useAI = true, // <- `true` by default
formState: { errors },
} = useForm();return (
console.log(data))}>
{errors.lastName &&Last name is required.
}
{errors.age &&Please enter number for age.
}
);
}
```Learn more about React-Hook-Form. This library only adds the _AI_ part.
### Contributors
Thanks go to the wonderful people behind React-Hook-Form. I just connected the dots.