Server Islands in Astro
From the Astro cheat sheet Β· Modern Astro (Server Islands, Actions, Sessions) Β· verified Jul 2026
Server Islands
Static page + dynamic server-rendered components streamed in
astro
---
// src/pages/product/[id].astro
import StaticInfo from '../../components/StaticInfo.astro'
import Cart from '../../components/Cart.astro'
---
<html>
<body>
<StaticInfo id={Astro.params.id} />
{/* server:defer renders this on the server AFTER the static HTML ships */}
<Cart server:defer>
<CartFallback slot="fallback" />
</Cart>
</body>
</html>π‘ Static HTML + server-streamed chunks in one response β no client JS to hydrate
π Requires an adapter and a deployment target that supports streaming
β‘ Always provide a <slot name="fallback"> so the static shell renders cleanly
π― Use for cart, "recently viewed", per-user banners on cacheable marketing pages
server-islandsstreamingmodern