# Alepha - React Form

## Installation

Part of the `alepha` package. Import from `alepha/react/form`.

```bash
npm install alepha
```

## Overview

Type-safe forms with validation.

**Features:**

- Form state management
- Zod schema validation
- Field-level error handling
- Submit handling with loading state
- Form reset

## API Reference

### React Hooks

- [`useFieldValue`](https://latest.alepha.dev/docs/reference-react-hooks-usefieldvalue.md) - Hook to subscribe to a single form field's value.
- [`useForm`](https://latest.alepha.dev/docs/reference-react-hooks-useform.md) - Custom hook to create a form with validation and field management.
- [`useFormQuerySync`](https://latest.alepha.dev/docs/reference-react-hooks-useformquerysync.md) - Two-way bind a `useForm` instance to the URL query params, keyed
- [`useFormState`](https://latest.alepha.dev/docs/reference-react-hooks-useformstate.md) - Tracks whichever `form` the caller currently passes in, not only the one
- [`useFormValues`](https://latest.alepha.dev/docs/reference-react-hooks-useformvalues.md) - Hook to subscribe to all form values.
