--- title: Introduction --- ### What is Svelte? Svelte is a tool for building fast web applications. It is similar to JavaScript frameworks such as React and Vue, which share a goal of making it easy to build slick interactive user interfaces. But there's a crucial difference: Svelte converts your app into ideal JavaScript at *build time*, rather than interpreting your application code at *run time*. This means you don't pay the performance cost of the framework's abstractions, and you don't incur a penalty when your app first loads. You can build your entire app with Svelte, or you can add it incrementally to an existing codebase. You can also ship components as standalone packages that work anywhere, without the overhead of a dependency on a conventional framework. [Read the introductory blog post](/blog/frameworks-without-the-framework) to learn more about Svelte's goals and philosophy. ### Understanding Svelte components In Svelte, an application is composed from one or more *components*. A component is a reusable self-contained block of code that encapsulates markup, styles and behaviours that belong together, written into an `.html` file. Here's a simple example: ```html

Hello {name}!

``` ```json /* { hidden: true } */ { name: 'world' } ``` > Wherever you see REPL links, click through for an interactive example Svelte turns this into a JavaScript module that you can import into your app: ```js /* { filename: 'main.js' } */ import App from './App.html'; const app = new App({ target: document.querySelector('main'), props: { name: 'world' }, }); // change the component's "name" prop. We'll learn about props (aka properties) below app.name = 'everybody'; // detach the component and clean everything up app.$destroy(); ``` Congratulations, you've just learned about half of Svelte's API! ### Getting started Normally, this is the part where the instructions might tell you to add the framework to your page as a `