tanstack-form

Builds validated React forms using TanStack Form, Zod schemas, and Field components.

Updated May 12, 2026
One-click install
npx skills add https://github.com/ahemdatef/Gradution-Project-iLMS-Software --skill tanstack-form-ahemdatef
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-form
Source: https://github.com/ahemdatef/Gradution-Project-iLMS-Software/tree/main/frontend/.github/skills/tanstack-form
Command: npx skills add https://github.com/ahemdatef/Gradution-Project-iLMS-Software --skill tanstack-form-ahemdatef

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @tanstack/react-form, zod, sonner.

What problem does it solve? Building accessible, validated forms in React requires wiring together state management, schema validation, error display, and accessibility attributes by hand, which is repetitive and error-prone. ## Core Features & Use Cases - Headless Form State: Uses TanStack Form's useForm hook and form.Field render-prop pattern for full control over markup and styling. - Schema Validation: Integrates Zod schemas with onChange, onBlur, and onSubmit validation modes for real-time feedback. - Accessible Error Display: Combines Field, FieldLabel, FieldError, and aria-invalid attributes to build accessible form controls for inputs, textareas, selects, and checkboxes. - Use Case: Create a bug report form with a title and description field, validate lengths with Zod on submit, and display inline errors next to each invalid field. ## Quick Start Ask the AI to build a validated React form with TanStack Form and Zod using the Field components for your chosen fields.

Frequently Asked Questions about tanstack-form

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a form with TanStack Form and Zod?

Define a Zod schema for your fields, create a form instance with useForm passing the schema under validators, and render fields with the form.Field render-prop pattern. Connect field.state.value and field.handleChange to your input components.

How to show validation errors in TanStack Form?

Compute isInvalid from field.state.meta.isTouched and field.state.meta.isValid, then render FieldError with field.state.meta.errors when invalid. Add data-invalid to the Field wrapper and aria-invalid to the control for accessibility.

What validation modes does TanStack Form support?

TanStack Form supports onChange, onBlur, and onSubmit validation modes through the validators option in useForm. You can combine multiple modes, for example validating on submit and revalidating on change.

Does TanStack Form work with Zod and other schema libraries?

Yes, TanStack Form integrates with Zod and other Standard Schema validation libraries through its validators API. You pass the schema directly to validators such as onSubmit, onChange, or onBlur.

How do I handle checkbox arrays in TanStack Form?

Use mode="array" on form.Field and TanStack Form's array helpers like field.pushValue and field.removeValue to manage checkbox groups. Validate the array with a Zod schema such as z.array(z.string()).min(1).