Svelte
Svelte is a JavaScript UI framework that shifts most of the work from runtime to build time. Svelte components are compiled into small, surgical, imperative JavaScript that updates the DOM directly, rather than relying on a virtual DOM. The result is a smaller bundle and often faster updates than the runtime alternatives.
Core ideas
- Compiled, not interpreted. The framework largely disappears at runtime; only the parts the components use are shipped.
- Reactive assignments. Plain variable assignments in Svelte are tracked; the compiler generates the right DOM updates.
- Runes (Svelte 5). A more explicit reactive primitive (
$state,$derived,$effect) replacing implicit magic for clearer semantics. - .svelte files. Single-file components combining script, markup, and style.
SvelteKit
The official meta-framework, providing file-based routing, server endpoints, SSR, SSG, ISR, layouts, and a Vite-based build pipeline. Most production Svelte applications use SvelteKit, similar to how most React applications use Next.js.
🔗