useForm composable is the primary way to create and manage forms in Vue applications using TanStack Form.
Import
Signature
Parameters
Optional configuration object for the form.
Initial values for the form fields.
Callback function called when the form is submitted.
Validation functions for the form.
Validator that runs on every change.
Async validator that runs on change with debouncing.
Validator that runs when the form loses focus.
Validator that runs when the form is mounted.
Return Value
The form API instance with Vue-specific extensions.
A Vue component for rendering individual form fields.
A composable for creating and managing individual fields.
A composable for subscribing to form state changes.
A component for subscribing to form state.
Function to trigger form submission.
Function to reset the form to its initial state.
Current state of the form including values, errors, and validation status.
Usage Example
See Also
- useField - Create and manage individual form fields
- Field Component - Render form fields declaratively
- FormApi - Core form API documentation