Blackwork
Scroll to top

Form

Bind TanStack Form to Blackwork fields.

Form

blackwork/form connects TanStack Form to Field.

Install the peer first:

Bash
pnpm add @tanstack/react-form

When to use

  • A real submit flow with values and validation
  • Reuse TextField, TextareaField, or CheckboxField

If you only need a labeled input, use Field.

Usage

Usage

Examples

Built-in fields

Built-in fields

Optional. Shown on your public profile.

Custom field

Select, Combobox, and other controls are not pre-bound. Compose them with Field inside form.AppField.

Custom field

API Reference

PropTypeDefaultDescription
formrequired{ handleSubmit: () => unknown }Form instance from useAppForm. Required on Form.
labelrequiredReactNodeVisible label on TextField, TextareaField, and CheckboxField.
descriptionReactNodeHelp text rendered under the control.

Notes

  • Form calls form.handleSubmit() for you.
  • SubmitButton follows isSubmitting and uses Button loading.