Svelte Essentials
Master Svelte 5 with runes, snippets, and SvelteKit - the modern way to build fast, reactive web applications
Table of Contents
Setup & Basics
Getting started with Svelte 5 and core concepts
Installation
Setting up a new Svelte 5 project
Component Structure
Basic Svelte component anatomy
Runes (Svelte 5)
New reactive primitives in Svelte 5
$state
Reactive state management rune
$derived
Computed values from state
$effect
Side effects and lifecycle
Control Flow
Conditional rendering and loops
If/Else Blocks
Conditional rendering
Each Blocks
Rendering lists and arrays
Stores
Global state management
Writable Stores
Creating and using writable stores
Derived & Readable
Computed and read-only stores
SvelteKit
Full-stack framework for Svelte
Routing
File-based routing in SvelteKit
Props & Bindings
Component props and data binding
$props
Component props in Svelte 5
$bindable
Two-way binding for props
Form Bindings
Two-way data binding with form elements
Snippets (Svelte 5)
Reusable template fragments (replaces slots)
Basic Snippets
Creating and using snippets
Component Snippets
Passing snippets between components
Events & Actions
Event handling and element actions
Event Handlers
Handling DOM events in Svelte 5
Actions
Reusable element behaviors
Transitions & Animations
Built-in transitions and animations
Built-in Transitions
Svelte built-in transition functions
Custom Transitions
Creating custom transition functions
Special Elements
Svelte special elements and components
Special Elements
Svelte special elements for advanced use cases