diff --git a/documentation/docs/01-introduction/03-svelte-files.md b/documentation/docs/01-introduction/03-svelte-files.md
index f534e30fcb..e3dd72c222 100644
--- a/documentation/docs/01-introduction/03-svelte-files.md
+++ b/documentation/docs/01-introduction/03-svelte-files.md
@@ -50,6 +50,9 @@ A `
+```
+
+Because Svelte's reactivity is based on assignments, using array methods like `.push()` and `.splice()` won't automatically trigger updates. A subsequent assignment is required to trigger the update. This and more details can also be found in the [tutorial](https://learn.svelte.dev/tutorial/updating-arrays-and-objects).
+
+```svelte
+
+```
+
+Svelte's `
+```
+
+> [!NOTE]
+> In Svelte 5+, state is explicitly reactive via the [`$state` rune]($state)
diff --git a/documentation/docs/99-legacy/02-legacy-reactive-statements.md b/documentation/docs/99-legacy/02-legacy-reactive-statements.md
new file mode 100644
index 0000000000..bbf14a7241
--- /dev/null
+++ b/documentation/docs/99-legacy/02-legacy-reactive-statements.md
@@ -0,0 +1,87 @@
+---
+title: $:
+---
+
+Any top-level statement (i.e. not inside a block or a function) can be made reactive by prefixing it with the `$:` [JS label syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label). Reactive statements run after other script code and before the component markup is rendered, whenever the values that they depend on have changed.
+
+```svelte
+
+```
+
+Only values which directly appear within the `$:` block will become dependencies of the reactive statement. For example, in the code below `total` will only update when `x` changes, but not `y`.
+
+```svelte
+
+
+
+Total: {total}
+
+
+
+```
+
+It is important to note that the reactive blocks are ordered via simple static analysis at compile time, and all the compiler looks at are the variables that are assigned to and used within the block itself, not in any functions called by them. This means that `yDependent` will not be updated when `x` is updated in the following example:
+
+```svelte
+
+
+```
+
+Moving the line `$: yDependent = y` below `$: setY(x)` will cause `yDependent` to be updated when `x` is updated.
+
+If a statement consists entirely of an assignment to an undeclared variable, Svelte will inject a `let` declaration on your behalf.
+
+```svelte
+
+
+```
+
+> [!NOTE]
+> In Svelte 5+, reactions are handled via the [`$derived`]($derived) and [`$effect`]($effect) runes
diff --git a/documentation/docs/99-legacy/03-legacy-export-let.md b/documentation/docs/99-legacy/03-legacy-export-let.md
new file mode 100644
index 0000000000..75ff14d4e1
--- /dev/null
+++ b/documentation/docs/99-legacy/03-legacy-export-let.md
@@ -0,0 +1,63 @@
+---
+title: export let
+---
+
+Svelte uses the `export` keyword to mark a variable declaration as a _property_ or _prop_, which means it becomes accessible to consumers of the component (see the section on [attributes and props](/docs/basic-markup#attributes-and-props) for more information).
+
+```svelte
+
+```
+
+You can specify a default initial value for a prop. It will be used if the component's consumer doesn't specify the prop on the component (or if its initial value is `undefined`) when instantiating the component. Note that if the values of props are subsequently updated, then any prop whose value is not specified will be set to `undefined` (rather than its initial value).
+
+In development mode (see the [compiler options](/docs/svelte-compiler#compile)), a warning will be printed if no default initial value is provided and the consumer does not specify a value. To squelch this warning, ensure that a default initial value is specified, even if it is `undefined`.
+
+```svelte
+
+```
+
+If you export a `const`, `class` or `function`, it is readonly from outside the component. Functions are valid prop values, however, as shown below.
+
+```svelte
+
+
+```
+
+Readonly props can be accessed as properties on the element, tied to the component using [`bind:this` syntax](/docs/component-directives#bind-this).
+
+You can use reserved words as prop names.
+
+```svelte
+
+
+```
+
+> [!NOTE]
+> In Svelte 5+, use the [`$props`]($props) rune instead
diff --git a/documentation/docs/99-legacy/04-legacy-$$props.md b/documentation/docs/99-legacy/04-legacy-$$props.md
new file mode 100644
index 0000000000..32f64287f0
--- /dev/null
+++ b/documentation/docs/99-legacy/04-legacy-$$props.md
@@ -0,0 +1,12 @@
+---
+title: $$props
+---
+
+`$$props` references all props that are passed to a component, including ones that are not declared with `export`. Using `$$props` will not perform as well as references to a specific prop because changes to any prop will cause Svelte to recheck all usages of `$$props`. But it can be useful in some cases – for example, when you don't know at compile time what props might be passed to a component.
+
+```svelte
+
+```
+
+> [!NOTE]
+> In Svelte 5+, this concept is unnecessary as you can use [`let prop = $props()`]($props) instead
diff --git a/documentation/docs/99-legacy/05-legacy-$$restProps.md b/documentation/docs/99-legacy/05-legacy-$$restProps.md
new file mode 100644
index 0000000000..db84a91030
--- /dev/null
+++ b/documentation/docs/99-legacy/05-legacy-$$restProps.md
@@ -0,0 +1,12 @@
+---
+title: $$restProps
+---
+
+`$$restProps` contains only the props which are _not_ declared with `export`. It can be used to pass down other unknown attributes to an element in a component. It shares the same performance characteristics compared to specific property access as `$$props`.
+
+```svelte
+
+```
+
+> [!NOTE]
+> In Svelte 5+, this concept is unnecessary as you can use [`let { foo, ...rest } = $props()`]($props) instead
diff --git a/documentation/docs/99-legacy/10-legacy-on.md b/documentation/docs/99-legacy/10-legacy-on.md
new file mode 100644
index 0000000000..9584a9aa70
--- /dev/null
+++ b/documentation/docs/99-legacy/10-legacy-on.md
@@ -0,0 +1,129 @@
+---
+title: on:
+---
+
+```svelte
+
+on:eventname={handler}
+```
+
+```svelte
+
+on:eventname|modifiers={handler}
+```
+
+Use the `on:` directive to listen to DOM events.
+
+```svelte
+
+
+
+
+```
+
+Handlers can be declared inline with no performance penalty. As with attributes, directive values may be quoted for the sake of syntax highlighters.
+
+```svelte
+
+```
+
+Add _modifiers_ to DOM events with the `|` character.
+
+```svelte
+
+```
+
+The following modifiers are available:
+
+- `preventDefault` — calls `event.preventDefault()` before running the handler
+- `stopPropagation` — calls `event.stopPropagation()`, preventing the event reaching the next element
+- `stopImmediatePropagation` - calls `event.stopImmediatePropagation()`, preventing other listeners of the same event from being fired.
+- `passive` — improves scrolling performance on touch/wheel events (Svelte will add it automatically where it's safe to do so)
+- `nonpassive` — explicitly set `passive: false`
+- `capture` — fires the handler during the _capture_ phase instead of the _bubbling_ phase
+- `once` — remove the handler after the first time it runs
+- `self` — only trigger handler if `event.target` is the element itself
+- `trusted` — only trigger handler if `event.isTrusted` is `true`. I.e. if the event is triggered by a user action.
+
+Modifiers can be chained together, e.g. `on:click|once|capture={...}`.
+
+If the `on:` directive is used without a value, the component will _forward_ the event, meaning that a consumer of the component can listen for it.
+
+```svelte
+
+```
+
+It's possible to have multiple event listeners for the same event:
+
+```svelte
+
+
+
+
+```
+
+> [!NOTE]
+> In Svelte 5+, use event attributes instead
+> ```svelte
+>
+> ```
+
+## Component events
+
+Component events created with [`createEventDispatcher`](svelte#createEventDispatcher) create a `CustomEvent`. These events do not bubble. The detail argument corresponds to the `CustomEvent.detail` property and can contain any type of data.
+
+```svelte
+
+
+
+```
+
+Events dispatched from child components can be listened to in their parent. Any data provided when the event was dispatched is available on the `detail` property of the event object.
+
+```svelte
+
+
+
+```
+
+> [!NOTE]
+> If you're planning on migrating to Svelte 5, use callback props instead. This will make upgrading easier as `createEventDispatcher` is deprecated
+> ```svelte
+>
+>
+>
+> ```
diff --git a/documentation/docs/99-legacy/20-legacy-slots.md b/documentation/docs/99-legacy/20-legacy-slots.md
new file mode 100644
index 0000000000..a82d8435bf
--- /dev/null
+++ b/documentation/docs/99-legacy/20-legacy-slots.md
@@ -0,0 +1,124 @@
+---
+title:
+---
+
+```svelte
+
+```
+
+```svelte
+
+```
+
+```svelte
+
+```
+
+Components can have child content, in the same way that elements can.
+
+The content is exposed in the child component using the `` element, which can contain fallback content that is rendered if no children are provided.
+
+```svelte
+
+
+
+ this fallback content will be rendered when no content is provided, like in the first example
+
+
+
+
+
+
+
+
+
this is some child content that will overwrite the default slot content
+
+```
+
+Note: If you want to render regular `` element, You can use ``.
+
+> [!NOTE]
+> In Svelte 5+, use snippets instead
+
+## ``
+
+Named slots allow consumers to target specific areas. They can also have fallback content.
+
+```svelte
+
+
+ No header was provided
+
Some content between header and footer
+
+
+
+
+
+
Hello
+
Copyright (c) 2019 Svelte Industries
+
+```
+
+Components can be placed in a named slot using the syntax ``.
+In order to place content in a slot without using a wrapper element, you can use the special element ``.
+
+```svelte
+
+
+ No header was provided
+
Some content between header and footer
+
+
+
+
+
+
+
+
All rights reserved.
+
Copyright (c) 2019 Svelte Industries
+
+
+```
+
+## ``
+
+Slots can be rendered zero or more times and can pass values _back_ to the parent using props. The parent exposes the values to the slot template using the `let:` directive.
+
+The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}`, and `` is equivalent to ``.
+
+```svelte
+
+
+ {#each items as item}
+
+
+
+ {/each}
+
+
+
+
+
{thing.text}
+
+```
+
+Named slots can also expose values. The `let:` directive goes on the element with the `slot` attribute.
+
+```svelte
+
+
+ {#each items as item}
+
+
+
+ {/each}
+
+
+
+
+
+
+
{item.text}
+
Copyright (c) 2019 Svelte Industries
+
+```
diff --git a/documentation/docs/99-legacy/21-legacy-$$slots.md b/documentation/docs/99-legacy/21-legacy-$$slots.md
new file mode 100644
index 0000000000..ad5fce6c80
--- /dev/null
+++ b/documentation/docs/99-legacy/21-legacy-$$slots.md
@@ -0,0 +1,28 @@
+---
+title: $$slots
+---
+
+`$$slots` is an object whose keys are the names of the slots passed into the component by the parent. If the parent does not pass in a slot with a particular name, that name will not be present in `$$slots`. This allows components to render a slot (and other elements, like wrappers for styling) only if the parent provides it.
+
+Note that explicitly passing in an empty named slot will add that slot's name to `$$slots`. For example, if a parent passes `` to a child component, `$$slots.title` will be truthy within the child.
+
+```svelte
+
+
+
+ {#if $$slots.description}
+
+
+
+ {/if}
+
+
+
+
+
Blog Post Title
+
+
+```
+
+> [!NOTE]
+> In Svelte 5+, this concept is obsolete, as you pass snippets as component props and can check whether or not that prop is set
diff --git a/documentation/docs/99-legacy/22-legacy-svelte-fragment.md b/documentation/docs/99-legacy/22-legacy-svelte-fragment.md
new file mode 100644
index 0000000000..99fe192f5a
--- /dev/null
+++ b/documentation/docs/99-legacy/22-legacy-svelte-fragment.md
@@ -0,0 +1,26 @@
+---
+title:
+---
+
+The `` element allows you to place content in a [named slot](/docs/special-elements#slot-slot-name-name) without wrapping it in a container DOM element. This keeps the flow layout of your document intact.
+
+```svelte
+
+
+ No header was provided
+
Some content between header and footer
+
+
+
+
+
+
Hello
+
+
All rights reserved.
+
Copyright (c) 2019 Svelte Industries
+
+
+```
+
+> [!NOTE]
+> In Svelte 5+, this concept is obsolete, as snippets don't create a wrapping element
diff --git a/documentation/docs/99-legacy/30-legacy-svelte-component.md b/documentation/docs/99-legacy/30-legacy-svelte-component.md
new file mode 100644
index 0000000000..2c04238f2d
--- /dev/null
+++ b/documentation/docs/99-legacy/30-legacy-svelte-component.md
@@ -0,0 +1,27 @@
+---
+title:
+---
+
+```svelte
+
+```
+
+The `` element renders a component dynamically, using the component constructor specified as the `this` property. When the property changes, the component is destroyed and recreated.
+
+If `this` is falsy, no component is rendered.
+
+```svelte
+
+```
+
+> [!NOTE]
+> In Svelte 5+, this concept is obsolete, as you can just reference `$state` or `$derived` variables containing components
+> ```svelte
+>
+>
+>
+>
+>
+> ```
diff --git a/documentation/docs/99-legacy/31-legacy-svelte-self.md b/documentation/docs/99-legacy/31-legacy-svelte-self.md
new file mode 100644
index 0000000000..b601eae62a
--- /dev/null
+++ b/documentation/docs/99-legacy/31-legacy-svelte-self.md
@@ -0,0 +1,37 @@
+---
+title:
+---
+
+The `` element allows a component to include itself, recursively.
+
+It cannot appear at the top level of your markup; it must be inside an if or each block or passed to a component's slot to prevent an infinite loop.
+
+```svelte
+
+
+{#if count > 0}
+
counting down... {count}
+
+{:else}
+
lift-off!
+{/if}
+```
+
+> [!NOTE]
+> This concept is obsolete, as you can just self-import components
+> ```svelte
+>
+>
+>
+> {#if count > 0}
+>
counting down... {count}
+>
+> {:else}
+>
lift-off!
+> {/if}
+> ```
diff --git a/documentation/docs/99-legacy/40-legacy-component-api.md b/documentation/docs/99-legacy/40-legacy-component-api.md
new file mode 100644
index 0000000000..26b3a31071
--- /dev/null
+++ b/documentation/docs/99-legacy/40-legacy-component-api.md
@@ -0,0 +1,198 @@
+---
+title: Imperative component API
+---
+
+## Creating a component
+
+```ts
+// @noErrors
+const component = new Component(options);
+```
+
+A client-side component — that is, a component compiled with `generate: 'dom'` (or the `generate` option left unspecified) is a JavaScript class.
+
+```ts
+// @noErrors
+import App from './App.svelte';
+
+const app = new App({
+ target: document.body,
+ props: {
+ // assuming App.svelte contains something like
+ // `export let answer`:
+ answer: 42
+ }
+});
+```
+
+The following initialisation options can be provided:
+
+| option | default | description |
+| --------- | ----------- | ---------------------------------------------------------------------------------------------------- |
+| `target` | **none** | An `HTMLElement` or `ShadowRoot` to render to. This option is required |
+| `anchor` | `null` | A child of `target` to render the component immediately before |
+| `props` | `{}` | An object of properties to supply to the component |
+| `context` | `new Map()` | A `Map` of root-level context key-value pairs to supply to the component |
+| `hydrate` | `false` | See below |
+| `intro` | `false` | If `true`, will play transitions on initial render, rather than waiting for subsequent state changes |
+
+Existing children of `target` are left where they are.
+
+The `hydrate` option instructs Svelte to upgrade existing DOM (usually from server-side rendering) rather than creating new elements. It will only work if the component was compiled with the [`hydratable: true` option](/docs/svelte-compiler#compile). Hydration of `` elements only works properly if the server-side rendering code was also compiled with `hydratable: true`, which adds a marker to each element in the `` so that the component knows which elements it's responsible for removing during hydration.
+
+Whereas children of `target` are normally left alone, `hydrate: true` will cause any children to be removed. For that reason, the `anchor` option cannot be used alongside `hydrate: true`.
+
+The existing DOM doesn't need to match the component — Svelte will 'repair' the DOM as it goes.
+
+```ts
+/// file: index.js
+// @noErrors
+import App from './App.svelte';
+
+const app = new App({
+ target: document.querySelector('#server-rendered-html'),
+ hydrate: true
+});
+```
+
+> [!NOTE]
+> In Svelte 5+, use [`mount`](svelte#mount) instead
+
+## `$set`
+
+```ts
+// @noErrors
+component.$set(props);
+```
+
+Programmatically sets props on an instance. `component.$set({ x: 1 })` is equivalent to `x = 1` inside the component's `