Docs

Superforms

Forms for SvelteKit.

What is Superforms

Superforms handles SvelteKit form state, validation, and errors from a single schema, server and client.

Install

npm
bash
npm install sveltekit-superforms zod

Usage

ts
ts
// +page.server.ts
import { superValidate } from 'sveltekit-superforms';
import { zod } from 'sveltekit-superforms/adapters';
export const load = async () => ({ form: await superValidate(zod(schema)) });

Docs

Official documentation: Superforms.