How to use exported forms in your SvelteKit project.
You need a SvelteKit project with these dependencies:
pnpm add sveltekit-superforms zodIn the builder, click Export then Download .zip. You'll get a folder with:
schema.ts — Zod validation schema+page.server.ts — Server-side validation and form action+page.svelte — Form component with client validationREADME.md — Quick referenceCopy the exported folder into your src/routes/ directory:
cp -r my-form/ src/routes/my-form/Edit the actions.default handler in +page.server.ts:
// In +page.server.ts, replace the TODO comment:
await db.insert(submissions).values(form.data);
// or
await sendEmail(form.data.email, form.data.message);The generated code uses plain Tailwind classes. Modify them to match your design system, or replace with your own component library.
Import the schema anywhere you need validation:
import { contactFormSchema } from './schema';
import type { ContactFormSchema } from './schema';Ready to build?