Outline updated November 2026

Foundation21 hours delivered over 3 daysLive, online

Request this course

Svelte Essentials

Class Duration

21 hours of live training delivered over 3 days

Student Prerequisites

  • JavaScript programming experience
  • HTML experience
  • Experience with CSS is helpful but not required

Target Audience

Web developers who are new to Svelte and want to build applications with SvelteKit. Teams continuing on can move to Svelte Pro Techniques, and teams adding a backend can move to Full-Stack Web Development with SvelteKit.

Description

This course teaches Svelte and SvelteKit from the ground up. Students learn runes for reactivity, callback props, snippets for passing markup, and attachments for reusable DOM behavior. They build SvelteKit apps with file-based routing, load functions, form actions, and TypeScript. Coverage includes server-side rendering, prerendering, error pages, and a first look at the experimental async features. Migration notes show pre-runes patterns so students can read existing code.

Learning Outcomes

  • Explain how Svelte's compiler and runes differ from React, Vue, and Angular.
  • Set up a SvelteKit project with npx sv create, Vite, and TypeScript.
  • Build pages, layouts, and API routes with SvelteKit file conventions.
  • Load data with server and universal load functions.
  • Apply $state, $derived, $effect, and $props to the right jobs.
  • Compose components with typed props, bindable props, and snippets.
  • Add reusable DOM behavior with {@attach} attachments.
  • Build forms with form actions, validation, and use:enhance.
  • Share state with .svelte.ts modules, context, and $app/state.
  • Read pre-runes Svelte code and migrate it to current patterns.

Training Materials

All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples. Students practice the topics covered through challenging hands-on lab exercises.

Software Requirements

Students will need a free, personal GitHub account to access the courseware. Students will need permission to install Node.js and Visual Studio Code on their computers. Also, students will need permission to install NPM Packages and Visual Studio Code extensions. If students are unable to configure a local environment, a cloud-based environment can be provided.

Software versions: Svelte 5 and SvelteKit 3 with Vite 8, TypeScript 6, and Node.js 22.17 or later.

Training Topics

Introduction to Svelte

  • What is Svelte? What problem does it solve?
  • Runes and explicit reactivity
  • Svelte vs. React, Vue, and Angular
  • The Svelte compiler
  • SvelteKit, the official app framework

Development Environment

  • Requirements
  • Project scaffolding with npx sv create
  • Adding tooling with sv add
  • src/routes, src/lib, and #lib imports
  • Configuring SvelteKit in vite.config.ts
  • Svelte extensions for VS Code and JetBrains
  • TypeScript and svelte-check
  • The generated $app/tsconfig
  • Vite dev server and HMR

SvelteKit Overview

  • File-based routing
  • Server-side rendering and hydration
  • Prerendering and static pages
  • Adapters and deployment targets
  • Unit testing with Vitest
  • End-to-end testing with Playwright

Getting Started

  • Exploring the Svelte playground
  • Layout, page, and component files
  • Markup, expressions, and attributes
  • The class attribute with objects and arrays
  • class: and style: directives
  • Compiling Svelte files

Static and Dynamic Pages

  • Static pages and prerendering
  • Head content with <svelte:head>
  • Scoped and global CSS
  • Images with @sveltejs/enhanced-img
  • Client-side rendering vs. SSR
  • {#if} and {#each} blocks
  • {#await} and {#key} blocks
  • Declaration tags for local values
  • Debugging with {@debug} and $inspect

Reactivity with Runes

  • The four core runes
  • $state for values, objects, and arrays
  • $derived and $derived.by
  • $effect for side effects
  • $state.raw and $state.snapshot
  • Reactive state in .svelte.ts modules
  • Migrating $: statements to runes

Component Basics

  • Component file structure
  • Props with $props() and TypeScript
  • Default values and rest props
  • Bindable props with $bindable()
  • Migrating export let to $props()

Component Composition

  • Nested components
  • Snippets with {#snippet} and {@render}
  • The children snippet
  • Snippet parameters
  • Passing data and callbacks to children
  • Component tree best practices
  • Migrating slots to snippets

Event Handling

  • DOM event attributes such as onclick
  • Event modifiers as wrapper functions
  • Callback props for component events
  • Forwarding handlers with spread props
  • Migrating on: and createEventDispatcher

Data Binding

  • bind:value, bind:checked, and bind:group
  • Bindable props with $bindable
  • Element references with bind:this

Attachments

  • What attachments are
  • Adding behavior with {@attach}
  • Attachment factories with parameters
  • Cleanup functions
  • Actions with use: in existing code

Forms

  • HTML form elements
  • Named form actions in +page.server.ts
  • Returning errors with fail()
  • Progressive enhancement with use:enhance
  • Handling form results

Lifecycle and Effects

  • $effect and $effect.pre
  • Effect cleanup functions
  • onMount and onDestroy
  • tick() for awaiting DOM updates

State Management

  • $state as the default choice
  • Shared state in .svelte.ts modules
  • Sharing state with context
  • Page and navigation state with $app/state
  • When stores still make sense
  • Migrating from $app/stores

Routing

  • File-based routing in SvelteKit
  • Route parameters and matchers
  • Layouts and route groups
  • Server load functions in +page.server.ts
  • Universal load functions in +page.ts
  • API routes in +server.ts
  • Navigation with links and goto

Errors and Redirects

  • error() and redirect() helpers
  • +error.svelte pages
  • Expected vs. unexpected errors
  • Fallback errors

Asynchronous Data

  • Promises and {#await} blocks
  • Load functions returning promises
  • Streaming non-essential data
  • Experimental await in components
  • <svelte:boundary> pending states
  • Experimental remote functions

Private team training

Bring this course to your team

Tell us about your team and we will tailor this outline to your tools, stack, and schedule. Courses can also be combined into a longer program.

  1. Tell us what you needYour tools, stack, team size, and timeline.
  2. We send a proposalA course or program, an outline adjusted to your team, and possible dates.
  3. Your team trains liveOnline or on-site, with courseware for every student.

Prefer to talk? Call +1 434-509-6890 or email help@cloudcontraptions.com.

We reply within 1 business day.

Training partner?