In the world of frontend development, we’ve long sought the sweet spot between performance and interactivity. Traditional Server-Side Rendering (SSR) delivers fast initial page loads but offers limited interactivity. Client-Side Rendering (CSR) provides rich interactive experiences at the cost of initial load performance. Islands Architecture emerges as an elegant solution to this dilemma.
What is Islands Architecture?
The concept of Islands Architecture was first introduced by Katie Sylor-Miller, a frontend architect at Etsy, in 2019. It was later refined and named by Jason Miller, the creator of Preact.
Picture your page as an ocean, where most content is static—like calm waters. The interactive components are like islands scattered across this ocean. Each “island” is an independent, interactive component that operates on its own without interfering with others.
┌─────────────────────────────────────────────┐
│ Static HTML (Ocean) │
│ ┌─────────┐ ┌─────────────┐ │
│ │ Island │ │ Island │ │
│ │ (React) │ │ (Vue) │ │
│ └─────────┘ └─────────────┘ │
│ │
│ Static Content │
│ │
│ ┌───────────────┐ ┌─────────┐ │
│ │ Island │ │ Island │ │
│ │ (Svelte) │ │ (Solid) │ │
│ └───────────────┘ └─────────┘ │
└─────────────────────────────────────────────┘
Core Principles
1. Static by Default, Interactive on Demand
The core idea of Islands Architecture is: pages are static by default, and JavaScript is only loaded for parts that explicitly need interactivity.
---
// Astro component - ships zero JavaScript by default
import Header from '../components/Header.astro';
import Counter from '../components/Counter.tsx';
---
<Header /> <!-- Pure static, 0 KB JavaScript -->
<!-- This component needs interactivity, so we add client:visible -->
<Counter client:visible />
2. Partial Hydration
Traditional SSR frameworks require “hydrating” the entire page—making the server-rendered static HTML interactive. Islands Architecture only hydrates individual “islands” independently.
| Strategy | Description | Use Case |
|---|---|---|
client:load | Hydrate immediately on page load | Critical above-the-fold interactions |
client:idle | Hydrate when browser is idle | Non-critical but commonly used components |
client:visible | Hydrate when component enters viewport | Interactive sections in long pages |
client:media | Hydrate when media query matches | Responsive interactive components |
client:only | Render only on client | Components requiring browser APIs |
3. Framework Agnostic
Islands Architecture allows using different frontend frameworks on the same page. You can simultaneously use React, Vue, and Svelte on a single page—they operate as independent islands.
---
import ReactCounter from './Counter.tsx';
import VueCarousel from './Carousel.vue';
import SvelteForm from './Form.svelte';
---
<ReactCounter client:visible />
<VueCarousel client:idle />
<SvelteForm client:load />
Performance Benefits
JavaScript Bundle Size Comparison
Using a typical blog page as an example:
Traditional SPA:
├── vendor.js ~150 KB (React + dependencies)
├── app.js ~80 KB (application code)
└── Total: ~230 KB JavaScript
Islands Architecture:
├── island-1.js ~5 KB (comments component)
├── island-2.js ~3 KB (like button)
└── Total: ~8 KB JavaScript
That’s a 96.5% reduction in JavaScript!
Core Web Vitals Improvements
- LCP (Largest Contentful Paint): Since most content is static HTML, browsers can render main content faster
- FID (First Input Delay): Less JavaScript means less main thread blocking
- CLS (Cumulative Layout Shift): Static content doesn’t shift due to JavaScript loading
Practical Example
Let’s see how a real blog post page leverages Islands Architecture:
---
// src/pages/blog/[slug].astro
import Layout from '../../layouts/Layout.astro';
import TableOfContents from '../../components/TableOfContents.astro';
import Comments from '../../components/Comments.tsx';
import ShareButtons from '../../components/ShareButtons.tsx';
import RelatedPosts from '../../components/RelatedPosts.astro';
import { getEntry } from 'astro:content';
const { slug } = Astro.params;
const post = await getEntry('blog', slug);
const { Content } = await post.render();
---
<Layout title={post.data.title}>
<!-- 100% Static Content -->
<article>
<h1>{post.data.title}</h1>
<TableOfContents headings={post.data.headings} />
<Content />
</article>
<!-- Interactive Islands -->
<ShareButtons
client:visible
url={Astro.url.href}
title={post.data.title}
/>
<!-- Lazy-loaded Comments -->
<Comments
client:visible
postId={slug}
/>
<!-- Static Related Posts -->
<RelatedPosts posts={post.data.relatedPosts} />
</Layout>
When to Choose Islands Architecture?
✅ Ideal Scenarios
- Content-focused websites: Blogs, documentation sites, marketing pages
- E-commerce product pages: Lots of product info + minimal interaction (cart, wishlist)
- News and media websites: Fast loading is a critical requirement
- Progressive enhancement apps: Core functionality doesn’t depend on JavaScript
⚠️ Proceed with Caution
- Highly interactive applications: Online editors, complex forms
- Real-time collaboration tools: Entire page needs dynamic updates
- Single Page Applications (SPAs): Frequent in-page navigation
Frameworks Supporting Islands Architecture
| Framework | Language | Highlights |
|---|---|---|
| Astro | JavaScript/TypeScript | Most mature implementation, multi-framework support |
| Fresh | TypeScript/Deno | Deno ecosystem, zero config |
| Marko | JavaScript | From eBay, battle-tested in production |
| Qwik | TypeScript | Extreme lazy loading, resumability |
| Îles | Vue | Designed for Vue ecosystem |
Conclusion
Islands Architecture represents a paradigm shift in web development:
It’s not “how to make static pages interactive,” but “how to embed interactivity in static pages.”
This architecture is particularly suited for content-driven websites, allowing us to:
- Maintain peak loading performance - Static content is immediately visible
- Introduce interactivity on demand - Only load JavaScript that’s actually needed
- Flexibly choose tech stacks - Different components can use different frameworks
- Progressive enhancement - Core content remains accessible even if JavaScript fails
If you’re building a content-focused website, Islands Architecture deserves serious consideration. It’s not a silver bullet, but in the right scenarios, it can deliver significant performance improvements and better user experiences.
This blog is built with Astro and Islands Architecture—you’re experiencing the fast loading that this architecture provides right now.