TanStack Form

Headless, type-safe form state management for React, Vue, Solid, Angular, and more

Library
npm
v1.33.5
6,699 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
92 /100 Excellent
Development Activity 100
Maintenance 96
Community 72
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
82 /100 Excellent
Architecture 88
Code Quality 84
Innovation 82
Learning Curve 72

TanStack Form is a headless library for managing complex form state — fields, validation, submission, and nested/array data — with full control over rendering and no bundled UI. It ships framework adapters for React, Vue, Solid, Angular, Lit, Svelte, and Preact on top of a shared, framework-agnostic core (@tanstack/form-core).

It is built TypeScript-first, inferring field types end-to-end so validation errors and field values stay in sync with your data shape. Validation can be synchronous or asynchronous, debounced, and driven by schema libraries like Zod or Yup via a standard schema adapter, making it a drop-in fit for teams that already validate data elsewhere in their stack.

What You Get

  • A framework-agnostic core (@tanstack/form-core) with adapters for React, Vue, Solid, Angular, Lit, Svelte, and Preact
  • End-to-end TypeScript inference so field values and validation errors stay type-safe without manual typing
  • Synchronous and asynchronous field/form validation with built-in debouncing
  • Standard Schema support for validating with Zod, Yup, or other schema libraries out of the box
  • Support for deeply nested and array fields with fine-grained subscriptions to avoid unnecessary re-renders
  • A devtools package (@tanstack/react-form-devtools) for inspecting form and field state during development

Common Use Cases

  • Building multi-step or wizard-style forms with per-step and cross-step validation
  • Managing dynamic, array-based form fields (e.g. adding/removing line items) with type safety
  • Validating form input against an existing Zod or Yup schema shared with backend validation
  • Building fully custom form UI where existing form libraries’ bundled components don’t fit the design system
  • Sharing form logic across a React web app and a Vue or Solid app via the common form-core

Under The Hood

Architecture - The monorepo’s packages/form-core/src/ (FormApi.ts, FieldApi.ts, ValidationLogic.ts) implements a headless, framework-agnostic state machine for form and field lifecycle, validation timing, and subscriptions. Framework packages such as packages/react-form/src/ (useForm.tsx, useField.tsx, createFormHook.tsx) are thin adapters that subscribe React components to slices of that core state, re-rendering only the fields that actually changed. FieldGroupApi.ts/FormGroupApi.ts extend the model to support composing reusable groups of fields across forms.

Tech Stack - Written entirely in TypeScript, managed as a pnpm-based monorepo with per-framework packages (react-form, vue-form, solid-form, angular-form, lit-form, svelte-form, preact-form) each depending on the shared form-core. Builds with Vite, tests with Vitest, and validates published output with publint. Validation integrates with the Standard Schema spec, making it compatible with Zod, Yup, and other schema libraries without a hard dependency on any one of them.

Code Quality - The react-form package alone has around 10 dedicated test files exercising hooks, field groups, and form submission flows under Vitest, and the project runs test:types against multiple pinned TypeScript versions (5.4 through 5.9) to catch type-inference regressions across the range of versions users might have installed. ESLint enforces style across src and tests.

API Design - The API surface is intentionally small and consistent across frameworks — useForm()/useField() in React and analogous hooks elsewhere — so switching between the reactive primitives of different frameworks requires learning the same core concepts once. Because the library is headless, initial setup requires wiring up your own field components, which is more boilerplate up front than fully-styled form libraries but pays off in design-system flexibility.

Used by 16 apps in this directory

TypeScript
54%
MIT

Anarlog

AI Assistants · Note Taking · Productivity

9,404

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
68
Dependency
Built with
TypeScript 54%
Rust 34%
Updated 4 days ago
TypeScript
99%
Apache 2.0

Colanode

Collaboration · Knowledge Management · Team Chat

5,152

Local-first, self-hosted workspace that combines real-time chat, Notion-style pages, and structured databases — all synced via CRDTs so you work offline without losing a keystroke.

View details
46
Repo Health
73
Technical
70
Dependency
Built with
TypeScript 99%
Updated 6 months ago
Rust
67%
Other

DefGuard

Authentication · Networking · Security

2,849

Self-hosted secure remote access that unifies WireGuard VPN, identity management, and connection-level MFA in one open-source platform.

View details
84
Repo Health
82
Technical
72
Dependency
Built with
Rust 67%
TypeScript 31%
Updated 1 weeks ago
TypeScript
50%
Other

Dify

AI Development · Design Tools · Developer Tools

157,364

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
66
Dependency
Built with
TypeScript 50%
Python 47%
Updated 4 days ago
TypeScript
99%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

484

Open-source GraphQL schema registry and observability platform with breaking change detection, federation support, and CI/CD integration for teams of any size.

View details
90
Repo Health
81
Technical
69
Dependency
Built with
TypeScript 99%
Updated 4 days ago
TypeScript
78%
LGPL 3.0

Latitude

AI Agents · Monitoring

4,686

Open-source AI agent monitoring that catches what will break next before your users do.

View details
86
Repo Health
88
Technical
67
Dependency
Built with
TypeScript 78%
Rust 11%
Python 11%
Updated 1 weeks ago
TypeScript
97%
Other

nango

Authentication · Automation · Developer Tools

12,376

Build product integrations with AI using 800+ APIs — auth, proxy, and TypeScript functions on production-grade infrastructure.

View details
93
Repo Health
85
Technical
67
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago
TypeScript
83%
Apache 2.0

nao

AI Development · Analytics

1,702

Build and deploy an open-source analytics agent that understands your data warehouse and answers business questions in plain English.

View details
84
Repo Health
76
Technical
67
Dependency
Built with
TypeScript 83%
Python 17%
Updated 6 days ago
TypeScript
93%
MIT

open-seo

Developer Tools · Marketing

21,424

Pay-as-you-go open source SEO platform with MCP integration — keyword research, rank tracking, backlinks, site audits, and AI brand visibility in one self-hosted tool.

View details
82
Repo Health
79
Technical
77
Dependency
Built with
TypeScript 93%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers