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 2
Each navigation is a full page load — the browser animates it with a slide 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
Image: Named sizes How the image transform pipeline works — declare resize / rotate / flip / modulate / format as named sizes; getImageUrl mints a deferred URL, getImage runs one inline. Captcha How the captcha works — slide-to-verify backed by a hash chain and proof-of-work, with no third party and no tracking. Lazy Server Islands How lazy server islands work — server islands marked mochi:defer:visible only fetch when the wrapper scrolls into view.