View Transitions
Add <ViewTransitions /> to a shared layout to animate full-page navigations via the browser's cross-document View Transitions API — no client router. The card animates while the video below is held still and keeps playing across the navigation, resuming at the same timestamp.
Page 1
Each navigation is a full page load — the browser animates it with a scale transition.
Heads up: Firefox doesn't currently support the cross-document View Transitions API, so navigations there swap instantly without animating.
<script lang="ts">
import { url } from 'mochi-framework';
import { ViewTransitions } from 'mochi-framework/components';
import TransitionCard from './TransitionCard.svelte';
const type = parseTransition(url.searchParams.get('type'));
</script>
<ViewTransitions {type} regions="card" />
<TransitionCard page={1} {type} />
More demos
Request ID How request IDs work — every request gets a UUID v7 on getRequestContext().requestId that rides every lifecycle event for correlation. MdSvex How mdsvex works — a .md file compiled through mdsvex and rendered as a Svelte component, embedded <script> and all. Nested Components How whole-subtree hydration works — a five-level recursive tree where hydrating the root carries the entire subtree in one island.