Svelte
The Svelte package provides the common provider and transition API. Add the SvelteKit helper when Kit owns navigation.
Common setup
Install @ssgoi/svelte and keep one Ssgoi provider above the changing page region. Transition factories and route rules are shared with the other web packages.
import { Ssgoi } from "@ssgoi/svelte";
import { drill } from "@ssgoi/svelte/view-transitions";SvelteKit
Experimental APIUse onNavigate to detach outgoing content before SvelteKit updates its live children snippet. A key around that snippet alone is not sufficient.
Setup
<!-- src/routes/+layout.svelte -->
<script>
import { Ssgoi } from "@ssgoi/svelte";
import { config } from "$lib/ssgoi-config";
import { SsgoiRouteBoundary } from "@ssgoi/svelte/sveltekit";
let { children } = $props();
</script>
<main class="relative z-0 min-h-dvh overflow-x-clip">
<Ssgoi {config}>
<SsgoiRouteBoundary class="min-h-full">
{@render children()}
</SsgoiRouteBoundary>
</Ssgoi>
</main>Why a boundary component
The root layout wrapper stays mounted while the live children snippet updates, so a marker on that wrapper has no OUT node. The component detaches the old routed region first — the lifecycle is included in the package; no copied component is needed.
plain {@render children()} : route change mutates DOM in place → no OUT node
boundary component : onNavigate → unmount old route (OUT captured)
→ SvelteKit updates the route
→ remount under the new id (IN animates)Beyond the basics
For a persistent /products shell, return the full pathname as id and /products as key from resolve, then put a second default pathname boundary only around the child content in routes/products/+layout.svelte. The stable outer key preserves header/tabs; the inner boundary produces tab transitions.
The helpers connect your router to the common implementation. Route boundaries explains how to connect another router directly. Transitions and route rules apply across the web frameworks.