Getting Started
Foundations
Integrations
Components
#Installation
npx @dinachi/cli@latest add form#Usage
tsx
import { Form } from "@/components/ui/form"#Examples
#API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| errors | Record<string, string | string[]> | — | Validation errors returned externally, typically after submission by a server or form action. |
| onFormSubmit | (values: Record<string, FormDataEntryValue>) => void | — | Event handler receiving form values as a JavaScript object; calls preventDefault() on submit. |
| validationMode | 'onSubmit' | 'onBlur' | 'onChange' | 'onSubmit' | Determines when validation occurs. Field-level setting takes precedence. |
| actionsRef | RefObject<Form.Actions | null> | — | Ref to imperative actions for programmatic validation control. |