$derived
$effect.pre$effect.tracking$effect.root$effect$props
$bindable
$inspect
$host
Basic markup
{#if ...}
{#each ...}
{#key ...}
{#await ...}
{#snippet ...}
{@render ...}
{@html ...}
{@const ...}
{@debug ...}
bind:
<input bind:value><input bind:checked><input bind:group><input bind:files><select bind:value><audio><video><img><details bind:open>bind:thisbind:_property_ for componentsuse:
transition:
in: and out:
animate:
style:
class
class: directiveScoped styles
Global styles
:global(...):globalCustom properties
Nested <style> elements
<svelte:boundary>
failedonerror<svelte:window>
<svelte:document>
<svelte:body>
<svelte:head>
<svelte:element>
<svelte:options>
Stores
writablereadablederivedreadonlygetContext
Lifecycle hooks
onMountonDestroytickbeforeUpdate / afterUpdateImperative component API
* mount
* unmount
* render
* hydrate
svelte/motion
Spring.ofTween.ofsvelte/reactivity/window
devicePixelRatioinnerHeightinnerWidthonlineouterHeightouterWidthscreenLeftscreenTopscrollXscrollYsvelte/reactivity
MediaQuerySvelteDateSvelteMapSvelteSetSvelteURLSvelteURLSearchParamscreateSubscribersvelte/server
rendersvelte/store
derivedfromStoregetreadablereadonlytoStorewritablesvelte/transition
blurcrossfadedrawfadeflyscaleslideIntroduction
Creating a project
Project structure
srcstatictestspackage.jsonsvelte.config.jstsconfig.jsonvite.config.js.svelte-kitWeb standards
Routing
+page+page.svelte+page.js+page.server.js+error+layout+layout.svelte+layout.js+layout.server.js+server$typesLoading data
Form actions
use:enhanceuse:enhancePage options
prerenderentriesssrcsrtrailingSlashconfigState management
Building your app
Adapters
Single-page apps
Advanced routing
Hooks
handlelocalshandleFetchhandleErrorinitreroutetransportErrors
Link options
data-sveltekit-preload-datadata-sveltekit-preload-codedata-sveltekit-reloaddata-sveltekit-replacestatedata-sveltekit-keepfocusdata-sveltekit-noscrollService workers
Server-only modules
Snapshots
Shallow routing
Auth * Sessions vs tokens * Integration points * Guides
Images
@sveltejs/enhanced-imgsrcset and sizesAccessibility
SEO
<title> and <meta>@sveltejs/kit
ServerVERSIONerrorfailisActionFailureisHttpErrorisRedirectjsonredirecttext@sveltejs/kit/hooks
sequence@sveltejs/kit/node/polyfills
installPolyfills@sveltejs/kit/node
createReadableStreamgetRequestsetResponse@sveltejs/kit/vite
sveltekit$app/environment
browserbuildingdevversion$app/forms
applyActiondeserializeenhance$app/navigation
afterNavigatebeforeNavigatedisableScrollHandlinggotoinvalidateinvalidateAllonNavigatepreloadCodepreloadDatapushStatereplaceState$app/paths
assetsbaseresolveRoute$app/server
read$app/state
navigatingpageupdated$app/stores
getStoresnavigatingpageupdated$env/dynamic/private
$env/dynamic/public
$env/static/private
$env/static/public
$lib
$lib/server$service-worker
basebuildfilesprerenderedversionConfiguration
compilerOptionsextensionskitadapteraliasappDircspmodedirectivesreportOnlycsrfcheckOriginembeddedenvdirpublicPrefixprivatePrefixfilesassetshookslibparamsroutesserviceWorkerappTemplateerrorTemplateinlineStyleThresholdmoduleExtensionsoutDiroutputpreloadStrategybundleStrategypathsassetsbaserelativeprerenderconcurrencycrawlentrieshandleHttpErrorhandleMissingIdhandleEntryGeneratorMismatchoriginroutertypeserviceWorkerregisterfiles?typescriptconfig?versionnamepollIntervalCommand Line Interface
svelte-kit syncTypes
tsconfig.json$lib$lib/serverapp.d.ts
* Error
* Locals
* PageData
* PageState
* PlatformActionActionFailureActionResultActionsAdapterAfterNavigateAwaitedActionsBeforeNavigateBuilderClientInitConfigCookiesEmulatorHandleHandleClientErrorHandleFetchHandleServerErrorHttpErrorHttpMethodLoggerMaybePromisePrerenderEntryGeneratorMismatchHandlerPrerenderEntryGeneratorMismatchHandlerValuePrerenderHttpErrorHandlerPrerenderHttpErrorHandlerValuePrerenderMapPrerenderMissingIdHandlerPrerenderMissingIdHandlerValuePrerenderOptionPrerenderedRequestOptionsRouteSegmentTrailingSlashCspCspDirectivesRequestHandlerRerouteResolveOptionsRouteDefinitionSSRManifestServerInitServerInitOptionsServerLoadServerLoadEventSnapshotSubmitFunctionTransportTransporter@sveltejs/kit/hooks
sequence@sveltejs/kit/node/polyfills
installPolyfills@sveltejs/kit/node
createReadableStreamgetRequestsetResponse@sveltejs/kit/vite
sveltekit$app/environment
browserbuildingdevversion$app/forms
applyActiondeserializeenhance$app/navigation
afterNavigatebeforeNavigatedisableScrollHandlinggotoinvalidateinvalidateAllonNavigatepreloadCodepreloadDatapushStatereplaceState$app/paths
assetsbaseresolveRoute$app/server
read$app/state
navigatingpageupdated$app/stores
getStoresnavigatingpageupdated$env/dynamic/private
$env/dynamic/public
$env/static/private
$env/static/public
$lib
$service-worker
basebuildfilesprerenderedversionOverview
sv create
sv add
sv check
sv migrate
Overview
Getting started
.svelte files
<script><script module><style>.svelte.js and .svelte.ts files
What are runes?
$state
$state.raw$state.snapshot$derived
$derived.by$effect
$effect.pre$effect.tracking$effect.rootImperative component API
mountunmountrenderhydrateLifecycle hooks
onMountonDestroytickbeforeUpdate / afterUpdateTesting
TypeScript
<script lang="ts">tsconfig.json settings$props$props$stateComponent typesvelte
SvelteComponentSvelteComponentTypedafterUpdatebeforeUpdatecreateEventDispatchercreateRawSnippetflushSyncgetAllContextsgetContexthasContexthydratemountonDestroyonMountsetContexttickunmountuntrackComponentComponentConstructorOptionsComponentEventsComponentInternalsComponentPropsComponentTypeEventDispatcherMountOptionsSnippetsvelte/action
ActionActionReturnsvelte/animate
flipAnimationConfigFlipParamssvelte/compiler
VERSIONcompilecompileModulemigrateparsepreprocesswalksvelte/easing
backInbackInOutbackOutbounceInbounceInOutbounceOutcircIncircInOutcircOutcubicIncubicInOutcubicOutelasticInelasticInOutelasticOutexpoInexpoInOutexpoOutlinearquadInquadInOutquadOutquartInquartInOutquartOutquintInquintInOutquintOutsineInsineInOutsineOutsvelte/events
onsvelte/motion
springtweenedSpringSpring.ofTweenTween.ofprefersReducedMotionOkay, I will continue the table of contents from where I left off, focusing on completing the entries related to Svelte, and then moving on to the SvelteKit sections.
$derived
$effect.pre$effect.tracking$effect.root$effect$props
$bindable
$inspect
$host
Basic markup
{#if ...}
{#each ...}
{#key ...}
{#await ...}
{#snippet ...}
{@render ...}
{@html ...}
{@const ...}
{@debug ...}
bind:
<input bind:value><input bind:checked><input bind:group><input bind:files><select bind:value><audio><video><img><details bind:open>bind:thisbind:_property_ for componentsuse:
transition:
in: and out:
animate:
style:
class
class: directiveScoped styles
Global styles
:global(...):globalCustom properties
Nested <style> elements
<svelte:boundary>
failedonerror<svelte:window>
<svelte:document>
<svelte:body>
<svelte:head>
<svelte:element>
<svelte:options>
Stores
writablereadablederivedreadonlygetContext
Lifecycle hooks
onMountonDestroytickbeforeUpdate / afterUpdateImperative component API
mountunmountrenderhydratesvelte/motion
Spring.ofTween.ofprefersReducedMotionsvelte/reactivity/window
devicePixelRatioinnerHeightinnerWidthonlineouterHeightouterWidthscreenLeftscreenTopscrollXscrollYsvelte/reactivity
MediaQuerySvelteDateSvelteMapSvelteSetSvelteURLSvelteURLSearchParamscreateSubscribersvelte/server
rendersvelte/store
derivedfromStoregetreadablereadonlytoStorewritablesvelte/transition
blurcrossfadedrawfadeflyscaleslideBlurParamsCrossfadeParamsDrawParamsEasingFunctionFadeParamsFlyParamsScaleParamsSlideParamsTransitionConfigsvelte/action
ActionActionReturnsvelte/animate
* flip
* AnimationConfig
* FlipParams
svelte/compiler
* VERSION
* compile
* compileModule
* migrate
* parse
* preprocess
* walk
* AST
* CompileError
* CompileOptions
* CompileResult
* MarkupPreprocessor
* ModuleCompileOptions
* Preprocessor
* PreprocessorGroup
* Processed
* Warning
svelte/easing
* backIn
* backInOut
* backOut
* bounceIn
* bounceInOut
* bounceOut
* circIn
* circInOut
* circOut
* cubicIn
* cubicInOut
* cubicOut
* elasticIn
* elasticInOut
* elasticOut
* expoIn
* expoInOut
* expoOut
* linear
* quadIn
* quadInOut
* quadOut
* quartIn
* quartInOut
* quartOut
* quintIn
* quintInOut
* quintOut
* sineIn
* sineInOut
* sineOut
svelte/events
onsvelte/motion
* spring
* tweened
SpringSpring.ofTweenTween.of
* prefersReducedMotionIntroduction
Creating a project
Project structure
srcstatictestspackage.jsonsvelte.config.jstsconfig.jsonvite.config.js.svelte-kitWeb standards
Routing
+page+page.svelte+page.js+page.server.js+error+layout+layout.svelte+layout.js+layout.server.js+server$typesLoading data
Form actions
use:enhanceuse:enhancePage options
prerenderentriesssrcsrtrailingSlashconfigState management
Building your app
Adapters
Single-page apps
Advanced routing
Hooks
handlelocalshandleFetchhandleErrorinitreroutetransportErrors
Link options
data-sveltekit-preload-datadata-sveltekit-preload-codedata-sveltekit-reloaddata-sveltekit-replacestatedata-sveltekit-keepfocusdata-sveltekit-noscrollService workers
Server-only modules
Snapshots
Shallow routing
Auth * Sessions vs tokens * Integration points * Guides
Images
@sveltejs/enhanced-imgsrcset and sizesAccessibility
SEO
<title> and <meta>@sveltejs/kit
ServerVERSIONerrorfailisActionFailureisHttpErrorisRedirectjsonredirecttextActionActionFailureActionResultActionsAdapterAfterNavigateAwaitedActionsBeforeNavigateBuilderClientInitConfigCookiesEmulatorHandleHandleClientErrorHandleFetchHandleServerErrorHttpErrorHttpMethodLoggerMaybePromisePrerenderEntryGeneratorMismatchHandlerPrerenderEntryGeneratorMismatchHandlerValuePrerenderHttpErrorHandlerPrerenderHttpErrorHandlerValuePrerenderMapPrerenderMissingIdHandlerPrerenderMissingIdHandlerValuePrerenderOptionPrerenderedRequestOptionsRouteSegmentTrailingSlash@sveltejs/kit/hooks
sequence@sveltejs/kit/node/polyfills
installPolyfills@sveltejs/kit/node
createReadableStreamgetRequestsetResponse@sveltejs/kit/vite
sveltekit$app/environment
browserbuildingdevversion$app/forms
applyActiondeserializeenhance$app/navigation
afterNavigatebeforeNavigatedisableScrollHandlinggotoinvalidateinvalidateAllonNavigatepreloadCodepreloadDatapushStatereplaceState$app/paths
assetsbaseresolveRoute$app/server
read$app/state
navigatingpageupdated$app/stores
getStoresnavigatingpageupdated$env/dynamic/private
$env/dynamic/public
$env/static/private
$env/static/public
$lib
$service-worker
basebuildfilesprerenderedversionOverview
sv create
sv add
sv check
sv migrate
Overview
Getting started
.svelte files
<script><script module><style>.svelte.js and .svelte.ts files
What are runes?
$state
$state.raw$state.snapshot$derived
$derived.by$effect
$effect.pre$effect.tracking$effect.rootImperative component API
mountunmountrenderhydrateLifecycle hooks
onMountonDestroytickbeforeUpdate / afterUpdateTesting
TypeScript
<script lang="ts">tsconfig.json settings$props$props$stateComponent typesvelte
SvelteComponentSvelteComponentTypedafterUpdatebeforeUpdatecreateEventDispatchercreateRawSnippetflushSyncgetAllContextsgetContexthasContexthydratemountonDestroyonMountsetContexttickunmountuntrackComponentComponentConstructorOptionsComponentEventsComponentInternalsComponentPropsComponentTypeEventDispatcherMountOptionsSnippetsvelte/action
ActionActionReturnsvelte/animate
flipAnimationConfigFlipParamssvelte/compiler
* VERSION
* compile
compileModulemigrateparsepreprocesswalksvelte/easing
* backIn
* backInOut
* backOut
* bounceIn
* bounceInOut
* bounceOut
* circIn
* circInOut
* circOut
* cubicIn
* cubicInOut
* cubicOut
* elasticIn
* elasticInOut
* elasticOut
* expoIn
* expoInOut
* expoOut
* linear
* quadIn
* quadInOut
* quadOut
* quartIn
* quartInOut
* quartOut
* quintIn
* quintInOut
* quintOut
* sineIn
* sineInOut
* sineOut
svelte/events
onsvelte/motion
* spring
* tweened
* Spring
Spring.ofTweenTween.of
* prefersReducedMotionOkay, I will continue the table of contents from that point, expanding the Svelte section and then moving to SvelteKit.
$derived
$effect.pre$effect.tracking$effect.root$effect$props
$bindable
$inspect
$host
Basic markup
{#if ...}
{#each ...}
{#key ...}
{#await ...}
{#snippet ...}
{@render ...}
{@html ...}
{@const ...}
{@debug ...}
bind:
<input bind:value><input bind:checked><input bind:group><input bind:files><select bind:value><audio><video><img><details bind:open>bind:thisbind:_property_ for componentsuse:
transition:
in: and out:
animate:
style:
class
class: directiveScoped styles
Global styles
:global(...):globalCustom properties
Nested <style> elements
<svelte:boundary>
failedonerror<svelte:window>
<svelte:document>
<svelte:body>
<svelte:head>
<svelte:element>
<svelte:options>
Stores
writablereadablederivedreadonlygetContext
Lifecycle hooks
onMountonDestroytickbeforeUpdate / afterUpdateImperative component API
* mount
* unmount
* render
* hydrate
svelte/motion
springSpring.oftweenedTween.ofprefersReducedMotionsvelte/reactivity/window
devicePixelRatioinnerHeightinnerWidthonlineouterHeightouterWidthscreenLeftscreenTopscrollXscrollYsvelte/reactivity
MediaQuerySvelteDateSvelteMapSvelteSetSvelteURLSvelteURLSearchParamscreateSubscribersvelte/server
* render
svelte/store
* derived
* fromStore
* get
* readable
* readonly
toStore
* writable
* Readable
* StartStopNotifier
* Subscriber
* Unsubscriber
* Updater
* Writablesvelte/transition
* blur
* crossfade
* draw
* fade
* fly
* scale
* slide
* BlurParams
* CrossfadeParams
* DrawParams
* EasingFunction
* FadeParams
* FlyParams
* ScaleParams
* SlideParams
* TransitionConfig
svelte/action
ActionActionReturnsvelte/animate
flipAnimationConfigFlipParamssvelte/compiler
VERSIONcompilecompileModulemigrateparsepreprocesswalksvelte/easing
* backIn
* backInOut
* backOut
* bounceIn
* bounceInOut
* bounceOut
* circIn
* circInOut
* circOut
* cubicIn
* cubicInOut
* cubicOut
* elasticIn
* elasticInOut
* elasticOut
* expoIn
* expoInOut
* expoOut
* linear
* quadIn
* quadInOut
* quadOut
* quartIn
* quartInOut
* quartOut
* quintIn
* quintInOut
* quintOut
* sineIn
* sineInOut
* sineOut
svelte/events
onsvelte/motion
springSpringSpring.oftweenedTweenTween.of
* prefersReducedMotionIntroduction
Creating a project
Project structure
srcstatictestspackage.jsonsvelte.config.jstsconfig.jsonvite.config.js.svelte-kitWeb standards
Routing
+page+page.svelte+page.js+page.server.js+error+layout+layout.svelte+layout.js+layout.server.js+server$typesLoading data
Form actions
use:enhanceuse:enhancePage options
prerenderentriesssrcsrtrailingSlashconfigState management
Building your app
Adapters
Single-page apps
Advanced routing
Hooks
handlelocalshandleFetchhandleErrorinitreroutetransportErrors
Link options
data-sveltekit-preload-datadata-sveltekit-preload-codedata-sveltekit-reloaddata-sveltekit-replacestatedata-sveltekit-keepfocusdata-sveltekit-noscrollService workers
Server-only modules
Snapshots
Shallow routing
Auth * Sessions vs tokens * Integration points * Guides
Images
@sveltejs/enhanced-imgsrcset and sizesAccessibility
SEO
<title> and <meta>@sveltejs/kit
ServerVERSIONerrorfailisActionFailureisHttpErrorisRedirectjsonredirecttextActionActionFailureActionResultActionsAdapterAfterNavigateAwaitedActionsBeforeNavigateBuilderClientInitConfigCookiesEmulatorHandleHandleClientErrorHandleFetchHandleServerErrorHttpErrorHttpMethodLoggerMaybePromisePrerenderEntryGeneratorMismatchHandlerPrerenderEntryGeneratorMismatchHandlerValuePrerenderHttpErrorHandlerPrerenderHttpErrorHandlerValuePrerenderMapPrerenderMissingIdHandlerPrerenderMissingIdHandlerValuePrerenderOptionPrerenderedRequestOptionsRouteSegmentTrailingSlash@sveltejs/kit/hooks
sequence@sveltejs/kit/node/polyfills
installPolyfills@sveltejs/kit/node
createReadableStreamgetRequestsetResponse@sveltejs/kit/vite
sveltekit$app/environment
browserbuildingdevversion$app/forms
applyActiondeserializeenhance$app/navigation
afterNavigatebeforeNavigatedisableScrollHandlinggotoinvalidateinvalidateAllonNavigatepreloadCodepreloadDatapushStatereplaceState$app/paths
assetsbaseresolveRoute$app/server
* read
$app/state
* navigating
* page
* updated
$app/stores
* getStores
* navigating
* page
* updated
$env/dynamic/private
$env/dynamic/public
$env/static/private
$env/static/public
$lib
$service-worker
basebuildfilesprerenderedversionOverview
sv create
sv add
drizzleeslintsveltekit-adapterluciamdsvexparaglideplaywrightprettierstorybooktailwindcssvitestsv check
sv migrate
app-statesvelte-5self-closing-tagssvelte-4sveltekit-2packageroutesOverview
Getting started
.svelte files
<script><script module><style>.svelte.js and .svelte.ts files
What are runes?
$state
$state.raw$state.snapshot$derived
$derived.by$effect
$effect.pre$effect.tracking$effect.rootImperative component API
mountunmountrenderhydrateLifecycle hooks
onMountonDestroytickbeforeUpdate / afterUpdateTesting
TypeScript
<script lang="ts">tsconfig.json settings$props$props$stateComponent typesvelte
* SvelteComponent
* SvelteComponentTyped
* afterUpdate
* beforeUpdate
* createEventDispatcher
createRawSnippet
* flushSync
* getAllContexts
* getContext
* hasContext
* hydrate
* mount
* onDestroy
* onMount
* setContext
* tick
* unmount
* untrack
* Component
* ComponentConstructorOptions
* ComponentEvents
* ComponentInternals
* ComponentProps
* ComponentType
* EventDispatcher
* MountOptions
* Snippetsvelte/action
ActionActionReturnsvelte/animate
flipAnimationConfigFlipParamssvelte/compiler
VERSIONcompilecompileModulemigrateparsepreprocesswalksvelte/easing
backInbackInOutbackOutbounceInbounceInOutbounceOutcircIncircInOutcircOutcubicIncubicInOutcubicOutelasticInelasticInOutelasticOutexpoInexpoInOutexpoOutlinearquadInquadInOutquadOutquartInquartInOutquartOutquintInquintInOutquintOutsineInsineInOutsineOutsvelte/events
* on
svelte/motion
springSpringSpring.oftweenedTweenTween.ofprefersReducedMotionIntroduction
Creating a project
Project structure
srclibserverparamsroutesapp.htmlerror.htmlhooks.client.jshooks.server.jsservice-worker.jsstatictestspackage.jsonsvelte.config.jstsconfig.jsonvite.config.js.svelte-kitWeb standards
Routing
+page+page.svelte+page.js+page.server.js+error+layout+layout.svelte+layout.js+layout.server.js+server$typesLoading data
Form actions
use:enhanceuse:enhancePage options
prerenderentriesssrcsrtrailingSlashconfigState management
Building your app
Adapters
Single-page apps
Advanced routing
Hooks
handlelocalshandleFetchhandleErrorinitreroutetransportErrors
Link options
data-sveltekit-preload-datadata-sveltekit-preload-codedata-sveltekit-reloaddata-sveltekit-replacestatedata-sveltekit-keepfocusdata-sveltekit-noscrollService workers
Server-only modules
Snapshots
Shallow routing
Auth * Sessions vs tokens * Integration points * Guides
Images
@sveltejs/enhanced-imgsrcset and sizesAccessibility
SEO
<title> and <meta>@sveltejs/kit
ServerVERSIONerrorfailisActionFailureisHttpErrorisRedirectjsonredirecttextActionActionFailureActionResultActionsAdapterAfterNavigateAwaitedActionsBeforeNavigateBuilderClientInitConfigCookies
* EmulatorHandleHandleClientErrorHandleFetchHandleServerErrorHttpErrorHttpMethodLogger
* MaybePromisePrerenderEntryGeneratorMismatchHandlerPrerenderEntryGeneratorMismatchHandlerValuePrerenderHttpErrorHandlerPrerenderHttpErrorHandlerValuePrerenderMapPrerenderMissingIdHandlerPrerenderMissingIdHandlerValuePrerenderOptionPrerenderedRequestOptionsRouteSegmentTrailingSlashCspCspDirectives@sveltejs/kit/hooks
* sequence
@sveltejs/kit/node/polyfills
installPolyfills@sveltejs/kit/node
createReadableStreamgetRequestsetResponse@sveltejs/kit/vite
sveltekit$app/environment
browserbuildingdevversion$app/forms
applyActiondeserializeenhance$app/navigation
afterNavigatebeforeNavigatedisableScrollHandlinggotoinvalidateinvalidateAllonNavigatepreloadCodepreloadDatapushStatereplaceState$app/paths
assetsbaseresolveRoute$app/server
* read
$app/state
* navigating
* page
* updated
$app/stores
* getStores
* navigating
* page
* updated
$env/dynamic/private
$env/dynamic/public
$env/static/private
$env/static/public
$lib
$service-worker
basebuildfilesprerenderedversionOverview
sv create
sv add
drizzleeslintsveltekit-adapterluciamdsvexparaglideOkay, I will focus on the SvelteKit documentation part and will organize it into more distinct categories to make it easier to navigate. I'll retain the original sectioning where appropriate, but also introduce some new categories that are more conceptual and feature-oriented.
# Table of Contents
# SvelteKit Fundamentals
1. **Introduction**
* Before we begin
* What is SvelteKit?
* What is Svelte?
* SvelteKit vs Svelte
2. **Creating a Project**
* Editor Setup
* Project Structure
* Project Files
* `src`
* `lib`
* `server`
* `params`
* `routes`
* `app.html`
* `error.html`
* `hooks.client.js`
* `hooks.server.js`
* `service-worker.js`
* `static`
* `tests`
* `package.json`
* `svelte.config.js`
* `tsconfig.json`
* `vite.config.js`
* Other Files
* `.svelte-kit`
3. **Web Standards in SvelteKit**
* Fetch APIs
* Request
* Response
* Headers
* FormData
* Stream APIs
* URL APIs
* URLSearchParams
* Web Crypto
# SvelteKit Routing and Pages
4. **Routing**
* `+page`
* `+page.svelte`
* `+page.js`
* `+page.server.js`
* `+error`
* `+layout`
* `+layout.svelte`
* `+layout.js`
* `+layout.server.js`
* `+server`
* Receiving data
* Fallback method handler
* Content negotiation
* `$types`
* Other files
* Further reading
5. **Advanced Routing**
* Rest parameters
* 404 pages
* Optional parameters
* Matching
* Sorting
* Encoding
* Advanced layouts
* (group)
* Breaking out of layouts
* +page@
* +layout@
* When to use layout groups
* Further reading
6. **Page Options**
* `prerender`
* Prerendering server routes
* When not to prerender
* Route conflicts
* Troubleshooting
* `entries`
* `ssr`
* `csr`
* `trailingSlash`
* `config`
* Further reading
7. **Link Options**
* `data-sveltekit-preload-data`
* `data-sveltekit-preload-code`
* `data-sveltekit-reload`
* `data-sveltekit-replacestate`
* `data-sveltekit-keepfocus`
* `data-sveltekit-noscroll`
* Disabling options
# SvelteKit Data Handling
8. **Loading Data**
* Page data
* Layout data
* Universal vs server
* Using URL data
* Making fetch requests
* Cookies
* Headers
* Using parent data
* Errors
* Redirects
* Streaming with promises
* Parallel loading
* Rerunning load functions
* Implications for authentication
* Further reading
9. **Form actions**
* Default actions
* Named actions
* Anatomy of an action
* Validation errors
* Redirects
* Loading data
* Progressive enhancement
* `use:enhance`
* Customising `use:enhance`
* Custom event listener
* Alternatives
* GET vs POST
* Further reading
# SvelteKit Advanced Features
10. **Hooks**
* Server hooks
* `handle`
* `locals`
* `handleFetch`
* Credentials
* Shared hooks
* `handleError`
* `init`
* Universal hooks
* `reroute`
* `transport`
* Further reading
11. **State management**
* Avoid shared state on the server
* Component and page state is preserved
* Storing state in the URL
* Storing ephemeral state in snapshots
12. **Snapshots**
13. **Shallow routing**
* API
* Loading data for a route
* Caveats
14. **Service workers**
* Inside the service worker
* During development
* Type safety
* Other solutions
15. **Server-only modules**
* Private environment variables
* Server-only utilities
* Your modules
* How it works
* Further reading
16. **Authentication**
* Sessions vs tokens
* Integration points
* Guides
# SvelteKit Deployment & Optimization
17. **Building your app**
* During the build
* Preview your app
18. **Adapters**
* Using adapters
* Platform-specific context
19. **Single-page apps**
* Usage
* Apache
* Prerendering individual pages
20. **Images**
* Vite's built-in handling
* `@sveltejs/enhanced-img`
* Setup
* Basic usage
* Dynamically choosing an image
* Intrinsic Dimensions
* `srcset` and `sizes`
* Per-image transforms
* Loading images dynamically from a CDN
* Best practices
# SvelteKit Accessibility & SEO
21. **Accessibility**
* Route announcements
* Focus management
* The "lang" attribute
* Further reading
22. **SEO**
* Out of the box
* Manual setup
* `<title>` and `<meta>`
* Sitemaps
* AMP
# SvelteKit API Reference
23. **@sveltejs/kit**
* `Server`
* `VERSION`
* `error`
* `fail`
* `isActionFailure`
* `isHttpError`
* `isRedirect`
* `json`
* `redirect`
* `text`
* `Action`
* `ActionFailure`
* `ActionResult`
* `Actions`
* `Adapter`
* `AfterNavigate`
* `AwaitedActions`
* `BeforeNavigate`
* `Builder`
* `ClientInit`
* `Config`
* `Cookies`
* `Emulator`
* `Handle`
* `HandleClientError`
* `HandleFetch`
* `HandleServerError`
* `HttpError`
* `HttpMethod`
* `Logger`
* `MaybePromise`
* `PrerenderEntryGeneratorMismatchHandler`
* `PrerenderEntryGeneratorMismatchHandlerValue`
* `PrerenderHttpErrorHandler`
* `PrerenderHttpErrorHandlerValue`
* `PrerenderMap`
* `PrerenderMissingIdHandler`
* `PrerenderMissingIdHandlerValue`
* `PrerenderOption`
* `Prerendered`
* `RequestOptions`
* `RouteSegment`
* `TrailingSlash`
* Csp
* CspDirectives
24. **@sveltejs/kit/hooks**
* `sequence`
25. **@sveltejs/kit/node/polyfills**
* `installPolyfills`
26. **@sveltejs/kit/node**
* `createReadableStream`
* `getRequest`
* `setResponse`
27. **@sveltejs/kit/vite**
* `sveltekit`
28. **$app/environment**
* `browser`
* `building`
* `dev`
* `version`
29. **$app/forms**
* `applyAction`
* `deserialize`
* `enhance`
30. **$app/navigation**
* `afterNavigate`
* `beforeNavigate`
* `disableScrollHandling`
* `goto`
* `invalidate`
* `invalidateAll`
* `onNavigate`
* `preloadCode`
* `preloadData`
* `pushState`
* `replaceState`
31. **$app/paths**
* `assets`
* `base`
* `resolveRoute`
32. **$app/server**
* `read`
33. **$app/state**
* `navigating`
* `page`
* `updated`
34. **$app/stores**
* `getStores`
* `navigating`
* `page`
* `updated`
35. **$env/dynamic/private**
36. **$env/dynamic/public**
37. **$env/static/private**
38. **$env/static/public**
39. **$lib**
40. **$service-worker**
* `base`
* `build`
* `files`
* `prerendered`
* `version`
# Start of Svelte CLI documentation
1. **Overview**
* Usage
* Acknowledgements
2. **sv create**
* Usage
* Options
3. **sv add**
* Usage
* Options
* Official add-ons
* `drizzle`
* `eslint`
* `sveltekit-adapter`
* `lucia`
* `mdsvex`
* `paraglide`
* `playwright`
* `prettier`
* `storybook`
* `tailwindcss`
* `vitest`
4. **sv check**
* Installation
* Usage
* Options
* Troubleshooting
* Machine-readable output
* Credits
* FAQ
5. **sv migrate**
* Usage
* Migrations
* `app-state`
* `svelte-5`
* `self-closing-tags`
* `svelte-4`
* `sveltekit-2`
* `package`
* `routes`
# Start of Svelte documentation
1. **Overview**
2. **Getting started**
* Alternatives to SvelteKit
* Editor tooling
* Getting help
3. **.svelte files**
* `<script>`
* `<script module>`
* `<style>`
4. **.svelte.js and .svelte.ts files**
5. **What are runes?**
6. **$state**
* Deep state
* Classes
* `$state.raw`
* `$state.snapshot`
* Passing state into functions
7. **$derived**
* `$derived.by`
* Understanding dependencies
* Update propagation
8. **$effect**
* Understanding dependencies
* `$effect.pre`
* `$effect.tracking`
* `$effect.root`
9. **Imperative component API**
* `mount`
* `unmount`
* `render`
* `hydrate`
10. **Lifecycle hooks**
* `onMount`
* `onDestroy`
* `tick`
* Deprecated: `beforeUpdate` / `afterUpdate`
* Chat window example
11. **Testing**
* Unit and integration testing using Vitest
* Using runes inside your test files
* Component testing
* E2E tests using Playwright
12. **TypeScript**
* `<script lang="ts">`
* Preprocessor setup
* Using SvelteKit or Vite
* Other build tools
* `tsconfig.json` settings
* Typing `$props`
* Generic `$props`
* Typing wrapper components
* Typing `$state`
* The `Component` type
* Enhancing built-in DOM types
13. **svelte**
* `SvelteComponent`
* `SvelteComponentTyped`
* `afterUpdate`
* `beforeUpdate`
* `createEventDispatcher`
* `createRawSnippet`
* `flushSync`
* `getAllContexts`
* `getContext`
* `hasContext`
* `hydrate`
* `mount`
* `onDestroy`
* `onMount`
* `setContext`
* `tick`
* `unmount`
* `untrack`
* `Component`
* `ComponentConstructorOptions`
* `ComponentEvents`
* `ComponentInternals`
* `ComponentProps`
* `ComponentType`
* `EventDispatcher`
* `MountOptions`
* `Snippet`
14. **svelte/action**
* `Action`
* `ActionReturn`
15. **svelte/animate**
* `flip`
* `AnimationConfig`
* `FlipParams`
16. **svelte/compiler**
* `VERSION`
* `compile`
* `compileModule`
* `migrate`
* `parse`
* `preprocess`
* `walk`
* AST
* CompileError
* CompileOptions
* CompileResult
* MarkupPreprocessor
* ModuleCompileOptions
* Preprocessor
* PreprocessorGroup
* Processed
* Warning
17. **svelte/easing**
* `backIn`
* `backInOut`
* `backOut`
* `bounceIn`
* `bounceInOut`
* `bounceOut`
* `circIn`
* `circInOut`
* `circOut`
* `cubicIn`
* `cubicInOut`
* `cubicOut`
* `elasticIn`
* `elasticInOut`
* `elasticOut`
* `expoIn`
* `expoInOut`
* `expoOut`
* `linear`
* `quadIn`
* `quadInOut`
* `quadOut`
* `quartIn`
* `quartInOut`
* `quartOut`
* `quintIn`
* `quintInOut`
* `quintOut`
* `sineIn`
* `sineInOut`
* `sineOut`
18. **svelte/events**
* `on`
19. **svelte/motion**
* `spring`
* `Spring`
* `Spring.of`
* `tweened`
* `Tween`
* `Tween.of`
* `prefersReducedMotion`
I've attempted to create a logical structure with these categories:
I've tried to bring a better categorization to the table of contents. Please let me know if you would like me to refine it further.