Compatibility
Each svebcomponents package remains in beta. Its API may change before 1.0.
Runtime requirements
Section titled “Runtime requirements”| Runtime | Requirement |
|---|---|
| Node | 20.19 or newer |
| Svelte | 5.x with the runes component API |
| Browser builds | custom elements and shadow DOM |
| Server-rendered output | declarative shadow DOM |
svebcomponents does not support Svelte 4 or the legacy component API.
Package peers
Section titled “Package peers”| Package | Peer dependencies |
|---|---|
@svebcomponents/build | none |
@svebcomponents/auto-options | svelte ^5 |
@svebcomponents/ssr | svelte ^5; optional vite ^6 || ^7 || ^8, tsdown >=0.22, and rolldown >=1.0.0-beta |
@svebcomponents/ssr-vue | vue ^3.5; optional vite ^6 || ^7 || ^8 |
@svebcomponents/ssr-react | react ^19 |
@svebcomponents/ssr-astro | astro ^5 |
@svebcomponents/utils has no peer dependencies. The public packages install
it as a dependency.
Host support
Section titled “Host support”- SvelteKit uses the Vite plugin and wrapper
components from
@svebcomponents/ssr. - React 19 uses a JSX runtime or an explicit
CustomElementcomponent. React 18 cannot pass custom-element properties and events with the React 19 behavior. - Vue 3.5 and Astro 5 use host-specific Vite plugins and wrappers.
The React integration works without Vite. The Vue integration requires Vite. Astro supplies Vite through its build pipeline.
Async server rendering
Section titled “Async server rendering”A component that awaits during Svelte’s server render needs
compilerOptions.experimental.async in SvelteKit. React Server Components,
Vue, and Astro use Svelte’s server renderer outside a Svelte app, so their
server entry must import @svebcomponents/ssr/enable-async before it renders
such a component. An async server-preparation hook needs an await-capable host
but does not need Svelte’s async compiler mode.
Read Async components for each host path.
Svelte in non-Svelte hosts
Section titled “Svelte in non-Svelte hosts”Install svelte in a React, Vue, or Astro app that server-renders these
elements. @svebcomponents/ssr calls Svelte’s server renderer, even when the
host app contains no Svelte source.