Svelte
- Pronounced
- svelt
Svelte is an open-source component framework and language for building interfaces, created by Rich Harris. Unlike the traditional JavaScript libraries, Svelte is not a monolithic framework you import into your application. Instead it compiles your HTML templates into specialised code that works directly with the DOM, which keeps files small and makes the client side faster.
One of its defining ideas is that interface elements update themselves automatically when the data behind them changes. This removes the need for an intermediate representation such as a virtual DOM — the thing that sets Svelte apart from React or Vue. Most of the work happens at compile time rather than in the browser, so the visitor’s device has less to do.
The Svelte compiler is written in JavaScript and licensed under the MIT licence, with the source on GitHub. Its bundle is among the smallest of any comparable frontend library — around 2 KB.