Hello World
The simplest possible Mochi page — a Svelte component rendered on the server with no client-side JavaScript.
Hello, world!
<script>
import { files } from './files.ts';
const sources = await loadSources(files);
</script>
<p>Hello, world!</p>
More demos
View Transitions How view transitions work — drop <ViewTransitions /> into a layout to animate full-page navigations with zero JavaScript. Lazy Server Islands How lazy server islands work — server islands marked mochi:defer:visible only fetch when the wrapper scrolls into view. Cookies How cookies work — read and write on the server and the client through one MochiCookieJar API (cookies.get/set/delete).