You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/05-special-elements/06-svelte-options.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,19 @@ title: <svelte:options>
8
8
9
9
The `<svelte:options>` element provides a place to specify per-component compiler options, which are detailed in the [compiler section](svelte-compiler#compile). The possible options are:
10
10
11
-
-`immutable={true}` — you never use mutable data, so the compiler can do simple referential equality checks to determine if values have changed
12
-
-`immutable={false}` — the default. Svelte will be more conservative about whether or not mutable objects have changed
13
-
-`accessors={true}` — adds getters and setters for the component's props
14
-
-`accessors={false}` — the default
15
11
-`runes={true}` — forces a component into _runes mode_ (see the [Legacy APIs](legacy-overview) section)
16
12
-`runes={false}` — forces a component into _legacy mode_
17
-
-`namespace="..."` — the namespace where this component will be used, most commonly "svg"; use the "foreign" namespace to opt out of case-insensitive attribute names and HTML-specific warnings
13
+
-`namespace="..."` — the namespace where this component will be used, can be "html" (the default), "svg" or "mathml"
18
14
-`customElement={...}` — the [options](custom-elements#Component-options) to use when compiling this component as a custom element. If a string is passed, it is used as the `tag` option
15
+
-`css="injected"` — the component will inject its styles inline: During server side rendering, it's injected as a `<style>` tag in the `head`, during client side rendering, it's loaded via JavaScript
16
+
17
+
> [!LEGACY] Deprecated options
18
+
> Svelte 4 also included the following options. They are deprecated in Svelte 5 and non-functional in runes mode.
19
+
>
20
+
> -`immutable={true}` — you never use mutable data, so the compiler can do simple referential equality checks to determine if values have changed
21
+
> -`immutable={false}` — the default. Svelte will be more conservative about whether or not mutable objects have changed
22
+
> -`accessors={true}` — adds getters and setters for the component's props
0 commit comments