tanstack-form Documentation
TanStack Form is a headless, framework-agnostic form library with first-class TypeScript
inference. This package covers React only (@tanstack/react-form@1.33.5, tag) plus the shared framework-agnostic core API — the angular, lit, preact, solid,
svelte, and vue docs are excluded by config.
Two things to know before answering from this package:
- The API is split across two reference trees. The React hooks (
useForm,useField, …) are incontents/framework/react/reference/. The objects they return (FormApi,FieldApi,FormGroupApi,FieldGroupApi) and every option/state shape are incontents/reference/. A question about "what can I call onform" is answered bycontents/reference/classes/FormApi.md, not by the hook docs. - Field names are type-checked deep paths.
namestrings are validated againstDeepKeys<typeof defaultValues>. Type errors on field names almost always trace tocontents/reference/type-aliases/DeepKeys.mdandDeepValue.md.
Quick Reference
| Task | Entry Point |
|---|---|
| Overview / concepts | contents/overview.md |
| Install | contents/installation.md |
| React quick start | contents/framework/react/quick-start.md |
| Terminology | contents/framework/react/guides/basic-concepts.md |
| Validation | contents/framework/react/guides/validation.md |
| Reusable field/form components | contents/framework/react/guides/form-composition.md |
| Multi-step wizards / subforms | contents/framework/react/guides/form-groups.md |
| SSR, server actions, Next/Remix/Start | contents/framework/react/guides/ssr.md |
| React Native / Expo | contents/framework/react/guides/react-native.md |
| Feature comparison vs other libs | contents/comparison.md |
| Core API (FormApi, FieldApi) | contents/reference/classes/ |
| TypeScript errors | contents/typescript.md |
When to use
Use this skill when the user asks about:
- Setting up TanStack Form in React, Next.js, Remix, TanStack Start, or React Native/Expo
- Form and field validation — sync, async, debounced, and the
onChange/onBlur/onSubmittiming model - Schema validation with Zod, Valibot, ArkType, or Effect Schema (Standard Schema v1)
revalidateLogic()andvalidators.onDynamic- Field arrays, dynamic/repeating rows, nested object fields
createFormHook/withForm/withFieldGroupcomposition and reusable bound components- Field groups, subforms, multi-step wizards
- Reactivity:
form.Subscribe,useStore, selectors, reducing re-renders - Listeners and side effects on field/form events
- Linked fields (password confirmation, dependent validation)
- Submission handling,
canSubmit/isSubmitting, resetting - Server-side validation with
createServerValidate,mergeForm,useTransform - Integrating Mantine, MUI, shadcn or other controlled input libraries
- Focus management and scroll-to-first-error
- TanStack Form devtools
- Any
FormApi/FieldApimethod, option, or state field by name
How to find information
- First, read
TOC.md— it has the full directory map, per-guide descriptions, and a task→file table - For a task or concept, go to
contents/framework/react/guides/{topic}.md - For a hook, read
contents/framework/react/reference/functions/{hook}.md - For a method or state field on the form/field object, read
contents/reference/classes/{FormApi,FieldApi,FormGroupApi,FieldGroupApi}.md - For a type or option shape by name, look in
contents/reference/interfaces/{Name}.mdthencontents/reference/type-aliases/{Name}.md - For working code, use the code samples inside the guides; example sources are not vendored.
TOC.md contains the full file listing organized by directory — always check it first.