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.
| Model | Source |
|---|---|
| sonnet | pack: frontend |
Full Reference
┏━ 🔧 sveltekit ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when building web applications with Svelte… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
SvelteKit
Section titled “SvelteKit”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.
| Version | SvelteKit 2.x / Svelte 5.x |
| Install | npm create svelte@latest my-app |
| Config | svelte.config.js |
| Docs | https://svelte.dev/docs/kit |
Reference Index
Section titled “Reference Index”Load only the reference docs relevant to the current task.
| I want to… | File |
|---|---|
| Setting up a new project, configuring Tailwind, project structure | reference/setup.md |
| File conventions, dynamic params, route groups, layouts, param matchers | reference/routing.md |
Universal load, server load, streaming, layout inheritance, depends/invalidate | reference/load-functions.md |
Form actions, use:enhance, Zod validation, named actions | reference/form-actions.md |
$state, $derived, $effect, $props, $bindable | reference/svelte5-runes.md |
| Snippets, event handling, bindings, transitions, control flow | reference/components.md |
handle, handleFetch, handleServerError, app.d.ts, sequence | reference/hooks.md |
+server.ts, GET/POST/PUT/PATCH/DELETE, response helpers | reference/api-routes.md |
Svelte stores, Svelte 5 global state, Context API, $app/stores | reference/state-management.md |
| Adapters (node, static, Vercel, Cloudflare, Netlify), env vars | reference/deployment.md |
| Choosing between SvelteKit and Next.js | reference/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.