Skip to content

sveltekit

Use when building web applications with SvelteKit — routing, server-side rendering, form actions, or load functions. Also use when choosing between SvelteKit and Next.js or building a full-stack Svelte application.

ModelSource
sonnetpack: frontend
Full Reference

┏━ 🔧 sveltekit ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when building web applications with Svelte… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

SvelteKit 2.x / Svelte 5.x — compiler-first, no virtual DOM. Svelte 5 with runes is the current standard; the old Options API (export let, $:) is legacy. Node 18.13+ required.

VersionSvelteKit 2.x / Svelte 5.x
Installnpm create svelte@latest my-app
Configsvelte.config.js
Docshttps://svelte.dev/docs/kit

Load only the reference docs relevant to the current task.

I want to…File
Setting up a new project, configuring Tailwind, project structurereference/setup.md
File conventions, dynamic params, route groups, layouts, param matchersreference/routing.md
Universal load, server load, streaming, layout inheritance, depends/invalidatereference/load-functions.md
Form actions, use:enhance, Zod validation, named actionsreference/form-actions.md
$state, $derived, $effect, $props, $bindablereference/svelte5-runes.md
Snippets, event handling, bindings, transitions, control flowreference/components.md
handle, handleFetch, handleServerError, app.d.ts, sequencereference/hooks.md
+server.ts, GET/POST/PUT/PATCH/DELETE, response helpersreference/api-routes.md
Svelte stores, Svelte 5 global state, Context API, $app/storesreference/state-management.md
Adapters (node, static, Vercel, Cloudflare, Netlify), env varsreference/deployment.md
Choosing between SvelteKit and Next.jsreference/sveltekit-vs-nextjs.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.