apps/docs/skills/zod-to-form-react/SKILL.md
Documentation site for zod-to-form (Docusaurus 3 + TypeDoc) Use when: You need form rendering in storybook, playgrounds, or low-traffic admin UIs —....
npx skillsauth add pradeepmouli/zod-to-form zod-to-form-reactInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Documentation site for zod-to-form (Docusaurus 3 + TypeDoc)
Choose your abstraction level: <ZodForm> for zero-config, useZodForm for custom
rendering, manual walkSchema for full control. Each step down trades convenience for
flexibility.
Use this skill when:
ZodForm — where bundle overhead is acceptable and a build step would add frictionZodForm — <ZodForm> and the CLI share the same walkSchema output so the migration is mechanicalform instance (e.g. to call form.setValue) → use useZodFormFormField[] → use useZodFormuseZodFormvalidationLevel: 1 or higher and need the lite schema to run before your submit handler → use wrapWithSchemaLite — this is the only function that wires schemaLite into RHF's handleSubmit flowDo NOT use when:
@zod-to-form/cli) instead; runtime schema walking includes the full Zod type graph traversal, which does not tree-shake (ZodForm)ZodForm)<ZodForm> instead; useZodForm returns fields[] and form, but rendering those fields requires wiring up each field component yourself (useZodForm)zodResolver path (no validationLevel) — validation is handled by RHF's resolver and adding this wrapper causes double-validation with no benefit (wrapWithSchemaLite)API surface: 5 functions, 7 types, 3 constants
componentConfig without a matching components map that covers the component names referenced — missing components are silently dropped at render time with no console error; add each name to components or use defaultComponentMap as the basefield.value) to work without a propMap in componentConfig — uncontrolled mode is the default; add propMap: { value: 'value', onChange: 'onChange' } in field config to opt in to controlled modewalkSchema is memoized by schema identity; an unstable reference causes re-walking on every render cycle; FIX: declare the schema outside the component or wrap in useMemonormalizeFormValues() before manually calling schema.safeParse() — the hook's internal resolver applies normalization, but manual calls do not; FIX: always call schema.safeParse(normalizeFormValues(values))formRegistry and fields options on the same call — when formRegistry is provided, fields is ignored entirely with no merge and no warning; FIX: pick one or merge field config into the registry manually before passing itschemaLite — it defeats the optimization and adds double-validation overhead; FIX: only pass the schema produced by walkSchema's result.schemaLite field (never the original z.object({...})).superRefine() — root refinements are stripped from schemaLite by design and will not run through this wrapper; FIX: use full zodResolver path and skip wrapWithSchemaLite entirely4 configuration interfaces — see references/config.md for details.
Components: ZodForm (Runtime React component that renders a type-safe form from a Zod v4 schema), ZodFormSwitch (Render the form matching source[discriminator], unmounting on changes via
a React key), ZodFormSwitchProps (Props for ZodFormSwitch), defaultComponentMap (The default HTML-based component map used by <ZodForm> and <FieldRenderer>), shadcnComponentMap (Component map pre-wired with shadcn/ui-styled implementations)
Hooks: useZodForm (React Hook Form integration hook for Zod v4 schemas), useExternalSync (Reset a form's values when an externally-supplied source object's reference
changes; preserve in-progress edits while the reference is stable)
Optimization: wrapWithSchemaLite (Wraps a form onSubmit handler with schemaLite client-side validation)
Types: FormField (Intermediate representation of a single form field produced by walkSchema), FormFieldOption (An individual option in a Select, RadioGroup, or similar enum-driven component), FormFieldConstraints (Structural constraints extracted from Zod's _zod), FormMeta(Per-schema annotation stored in az), FieldTemplateProps (Props passed to the field template component that wraps each rendered form field)
FieldRenderer: ZodFormComponents (Public component-map type for <ZodForm components={…}>)
components: FIELD_COMPONENT_NAMES (User-facing field component names derived from defaultCom...)
Load these on demand — do NOT read all at once:
references/functions.md for full signatures, parameters, and return typesreferences/types.mdreferences/variables.mdreferences/config.md for all settings and defaultstools
Use when working with zod-to-form (core, react, cli, codegen, vite).
tools
Vite plugin for zod-to-form — transforms ?z2f imports into generated form components and optionally replaces <ZodForm> JSX call sites with generated components at build time Use when: You want `import SignupForm from './signup.schema?z2f'` to Just Work in a.... Also: vite, vite-plugin, zod, zod-v4, codegen, forms, form-generation, schema-driven, react-hook-form, build-plugin, jsx-transform.
development
Runtime <ZodForm> renderer for Zod v4 schemas Use when: You need form rendering in storybook, playgrounds, or low-traffic admin UIs —.... Also: zod, zod-v4, react, forms, form-generation, react-hook-form, schema-driven, dynamic-forms, form-renderer, hookform-resolver, zod-form-renderer.
development
Schema walker and processor registry for Zod v4 form generation Use when: You want per-field validation instead of whole-form validation. Also: zod, zod-v4, forms, form-generation, schema, schema-walker, processor-registry, react-hook-form, schema-driven, form-schema, zod-registry.