Web development for the rest of us
open sourceMITfree
Svelte is a UI framework that uses a compiler: components written in .svelte files with HTML, CSS and JavaScript (or TypeScript) are compiled into lean, tightly optimized JavaScript that does minimal work in the browser, instead of shipping a large runtime or diffing a virtual DOM. Svelte 5 expresses reactivity with runes ($state, $derived, $effect, $props), styles are scoped to their component by default, and transitions and animations are built in. It is an alternative to React and Vue.js, and SvelteKit is its companion framework for full-stack apps with routing and server rendering.
Problems it solves
- write UI components with less boilerplate than React
- ship less JavaScript to the browser for my web app
- a frontend framework without a virtual DOM that compiles components ahead of time
- reactive state in components that is just a variable assignment
- scoped CSS per component without a CSS-in-JS library
- built-in transitions and animations for UI elements
- build fast interactive data graphics and widgets for a news site
- a UI framework that is pleasant to learn if I already know HTML, CSS and JavaScript
Features
- compiler that turns components into optimized JavaScript
- runes for reactivity ($state, $derived, $effect, $props)
- scoped styles by default
- built-in transitions and animations
- TypeScript support
- custom elements output
- server-side rendering
Alternatives
The same job
These do what Svelte does.
