Svelte components use the .svelte
file extension. A component can contain a template, script, and style.
Valid HTML is a valid Svelte component. Here's the most basic component you can make: a plain text string.
Let's get started!
In this example, we'll build a small hello world component.
Svelte components use the .svelte
file extension. A component can contain a template, script, and style.
Valid HTML is a valid Svelte component. Here's the most basic component you can make: a plain text string.
Since we're building for the web, let's add HTML.
Further reading on this topic.