Form
blackwork/form connects TanStack Form to Field.
Note
It is not a form engine. It only binds TanStack Form to Blackwork fields.
Install the peer first:
Bash
pnpm add @tanstack/react-formWhen to use
- A real submit flow with values and validation
- Reuse
TextField,TextareaField, orCheckboxField
If you only need a labeled input, use Field.
Usage
Usage
Examples
Built-in fields
Built-in fields
Custom field
Select, Combobox, and other controls are not pre-bound. Compose them with Field inside form.AppField.
Custom field
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
formrequired | { handleSubmit: () => unknown } | — | Form instance from useAppForm. Required on Form. |
labelrequired | ReactNode | — | Visible label on TextField, TextareaField, and CheckboxField. |
description | ReactNode | — | Help text rendered under the control. |
Notes
Formcallsform.handleSubmit()for you.SubmitButtonfollowsisSubmittingand usesButtonloading.
Note
useAppForm must run in a client component.