SvelteKit

Application framework built on Svelte for routing, server-side rendering, and deployment of web apps.

Works with AI agents:llms.txtMCPCLI
Ask your AI about this, with this page as the source:ChatGPT ↗Claude ↗Perplexity ↗

SvelteKit is the application framework for Svelte, the role Next.js plays for React or Nuxt for Vue. Svelte compiles components into small JavaScript and CSS; SvelteKit adds routing, data loading, server code, rendering options and the build, using Vite.

Routes are folders under src/routes. A +page.svelte file renders a page, a +page.server.js load function fetches its data on the server, form actions handle POSTed forms without client JavaScript, and +server.js files are plain API endpoints. Hooks run on every request for things like reading a session cookie. By default the first page is server-rendered and later navigation happens in the browser, and you can set prerendering, SSR or client-only rendering per page or layout.

Adapters turn the build into output for a target. Official ones cover Node servers, Bun, static sites, Vercel, Netlify and Cloudflare, with community adapters for other platforms. It also supports service workers for offline apps, and a SPA build can be wrapped with Tauri or Capacitor for desktop and mobile.

Limits to know: there is no built-in auth or database layer, though the Svelte CLI can set up Better Auth and database integrations. Remote functions, its newer typed client-server calls, are still experimental. The ecosystem of components and examples is smaller than React's.

Where it fits

How SvelteKit itself is built

5 tools, from its own code, website and Product Hunt page.

Who uses it

No maker's live product on record yet, and 66 open-source projects that declare it in their code.

We haven't found a maker's live product that uses SvelteKit yet — only the open-source projects below, which declare it in their code.

Open source: a project that declares SvelteKit as a dependency in its public code — verifiable, but not necessarily a live product.

Loved and watch-outs

Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.

Most loved
  • Developers find it simpler and more productive than Next.js, and rewrites from Next.js go smoothly. HNHN 2HN 3
  • It stays close to plain HTML, CSS and JavaScript, so it is easy to learn from web basics. HNHN 2HN 3
  • It works for small SPAs and scales up when an app unexpectedly grows complex. HNHN 2HN 3
  • Coding agents produce working SvelteKit apps quickly. HNHN 2
Watch-outs
  • API changes during active development make projects feel unstable and hard to test. HNHN 2
  • It is not batteries-included, so ORM, admin and auth rely on third-party packages that feel hacky. HN
  • Component CSS stays in the page after unmount by design, causing layout bugs that depend on navigation path. HN

Reliability and open issues

Most wanted on GitHubOpen on 2026-10-04 in sveltejs/kit, with activity in the last year — issues and feature requests by 👍.

Who switches

Public pull requests on GitHub since Oct 2024 whose title says "X to Y" — real code changes moving a project from one tool to another, by developers in general. Open a row to see the pull requests.

Next.js → SvelteKit22 PRs
React → SvelteKit17 PRs
Astro → SvelteKit4 PRs
Nuxt → SvelteKit3 PRs
SvelteKit → Astro13 PRs
SvelteKit → Next.js11 PRs
SvelteKit → React8 PRs
SvelteKit → Nuxt3 PRs

Alternatives to SvelteKit

All alternatives by situation →

Questions makers ask about SvelteKit

Where can I deploy a SvelteKit app?

You pick an adapter for the target. Official adapters exist for Node servers, Bun, static hosting, Vercel, Netlify and Cloudflare, and community adapters cover other platforms. source ↗

Can it generate a fully static site?

Yes. adapter-static prerenders the whole site to files. To prerender only some pages and server-render the rest, use another adapter with the prerender page option. source ↗

Can I build a client-only single-page app?

Yes, by turning off SSR and serving a fallback page. The docs warn this costs load performance and SEO, and suggest prerendering as many pages as you can. source ↗

Can I use it with a backend written in another language?

Yes. The recommended setup deploys the SvelteKit frontend separately with the Node or a serverless adapter; you can also serve it as a SPA from your existing backend, with worse SEO and performance. source ↗

How do I add authentication?

SvelteKit has no built-in auth. You check the session cookie in the handle hook and put the user on locals; the Svelte CLI can set up Better Auth, and the Lucia guide covers building session auth yourself. source ↗

How do I connect a database?

Query the database only in server code, typically through a shared client module, never in .svelte components. The Svelte CLI can set up database integrations for you. source ↗

Can I ship it as a mobile or desktop app?

Yes. A SvelteKit SPA can be packaged as a mobile app with Tauri or Capacitor, or as a desktop app with Tauri, Wails or Electron. source ↗

Is SvelteKit free?

Yes — it is free, open-source software.

Is SvelteKit open source or self-hostable?

Open source, and you can self-host it. source ↗

Can AI coding agents work with SvelteKit?

It serves an llms.txt docs index; it has an official MCP server (dev.svelte/mcp); it has an official CLI (@sveltejs/kit).

Who uses SvelteKit?

No maker's live product we track yet; 66 open-source projects declare it in their code. source ↗