frontend-form

Adds TanStack Form and Zod based form components to web feature folders.

Updated May 7, 2026
One-click install
npx skills add https://github.com/Pieter-1337/Euricom-tsz --skill frontend-form-pieter-1337
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-form
Source: https://github.com/Pieter-1337/Euricom-tsz/tree/main/.claude/skills/tsz-frontend-form
Command: npx skills add https://github.com/Pieter-1337/Euricom-tsz --skill frontend-form-pieter-1337

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building forms in a React app usually means repeating TanStack Form boilerplate, wiring Zod validation twice, and hand-rolling server-error handling for every feature. This Skill standardizes form creation in packages/web so each form only owns its schema, defaults, fields, and submit logic. ## Core Features & Use Cases - Shared form base: Uses useAppForm with bound field components (TextField, NumberField, SelectField, TextareaField, CheckboxField, DateField) that render labels and errors automatically. - Server-error wiring: Applies ProblemDetails field errors via useFormServerErrors and a FormErrorBanner, with throwApiError on the server side. - Create, edit, and dialog variants: Provides patterns for create forms, edit forms with baseline reset, and forms inside dialogs with custom cancel behavior. - Use Case: Add a user-edit form to src/features/users with a Zod schema, a createServerFn submit handler, and Save/Cancel buttons that disable automatically based on dirty state. ## Quick Start Ask the agent to add a form to a feature in packages/web, specifying the fields, validation rules, and whether it is a create or edit form.

Frequently Asked Questions about frontend-form

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

FAQPage Schema
How do I add a form to a React feature with TanStack Form?

Create a Zod schema in the feature's schemas.ts, add a createServerFn submit handler in server-fns.ts, then build the form component with useAppForm and bound field components. The route file stays thin and passes data in as props.

How do I show server-side validation errors in TanStack Form?

Use useFormServerErrors with the form instance and a list of field names. It parses ProblemDetails responses, applies per-field errors via errorMap.onServer, and exposes a banner message rendered with FormErrorBanner.

Does TanStack Form support Zod validation on both client and server?

Yes. The same Zod schema can drive client-side onChange validation through the form's validators option and server-side validation through createServerFn's inputValidator, keeping both layers in sync.

How do I disable the submit button until a form is dirty?

The shared form base compares current values against defaultValues with a deep-equal check and disables submit when there are no changes, when client errors exist, or while submitting. After saving, call form.reset(value) to set a new baseline.

When should a form use a cancel button versus save only?

Edit forms use the cancel prop to revert to baseline values, dialog forms pass cancel={onClose} to close the dialog, and create forms typically omit cancel entirely since there is no original state to revert to.