<svelte:options>
<svelte:options option={value} />
The <svelte:options>
element provides a place to specify per-component compiler options, which are detailed in the compiler section. The possible options are:
immutable={true}
— you never use mutable data, so the compiler can do simple referential equality checks to determine if values have changedimmutable={false}
— the default. Svelte will be more conservative about whether or not mutable objects have changedaccessors={true}
— adds getters and setters for the component’s propsaccessors={false}
— the defaultrunes={true}
— forces a component into runes mode (see the Legacy APIs section)runes={false}
— forces a component into legacy modenamespace="..."
— 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 warningscustomElement={...}
— the options to use when compiling this component as a custom element. If a string is passed, it is used as thetag
option
<svelte:options customElement="my-custom-element" />
previous next