Skip to content
Back to insights

Astro · Astro 7

The Astro Framework: What It Does, What Astro 7 Brings, When It Fits

What is Astro? The framework ships HTML instead of JavaScript: islands, rendering, Astro 7, strengths, limits and a neutral comparison with Next.js (Nov 2026).

Updated 9 min readResponsible: Mehdi Bornak

Astro is an open-source web framework for content-driven websites such as blogs, marketing sites, documentation and online shops. By default it renders pages to HTML at build time and sends no JavaScript to the browser unless you deliberately add interactive “islands”. The current major version is Astro 7, released on June 22, 2026; since January 2026 the company behind Astro has been part of Cloudflare.

What is the Astro framework?

Astro is a JavaScript framework designed for fast, content-driven websites. The team calls its approach “server-first”: pages are produced on the server or at build time, and client-side rendering is added only where you explicitly ask for it.

The basic building block is the .astro component: a plain HTML template with no runtime in the browser. A script section sits between two --- lines at the top, the markup below it. According to the docs, knowing HTML is enough to write your first component.

For interactivity you bring in components from UI frameworks. There are official integrations for React, Preact, Svelte, Vue, SolidJS and Alpine.js, and you can combine components from several frameworks on the same page. Astro is released under the MIT licence and is free to use.

How do islands work in Astro?

An island is an interactive component on an otherwise static HTML page. By default, Astro renders every UI component to HTML and CSS only and strips out the browser-side JavaScript. Only a client: directive turns a React, Vue or Svelte component into an island that is hydrated, meaning made interactive, in the browser.

The term “component island” was coined in 2019 by Katie Sylor-Miller, frontend architect at Etsy; Preact creator Jason Miller described the concept in detail in August 2020. Astro builds its architecture on that idea.

DirectiveWhen the JavaScript loadsGood for
client:loadimmediately on page load (high priority)elements that must be visible and usable right away
client:idleafter the initial load, once the browser is idle (medium priority)elements that don’t need to respond immediately
client:visiblewhen the component enters the viewport (low priority)elements far down the page or expensive to load
client:mediawhen a given CSS media query matches (low priority)for example sidebar toggles that only appear at certain screen sizes
client:onlyimmediately, without HTML rendering on the servercomponents that should render only in the browser

One rule to remember: client: directives only work on UI framework components imported directly into an .astro file. An .astro component itself cannot be hydrated this way.

There are also server islands. With the server:defer directive, the page is delivered immediately, optionally with a placeholder, while the component’s content is rendered separately on the server and displayed once it is available. This requires an adapter, in other words a server runtime.

Static or server: how does Astro render?

By default, all pages, routes and API endpoints are pre-rendered at build time. The result is a set of static pages in the dist/ output folder.

For content that has to be generated on every request, such as an account page for logged-in users, Astro offers on-demand rendering, also known as server-side rendering (SSR). You install an adapter for this; official adapters exist for Cloudflare, Netlify, Node and Vercel. You can then switch single pages to server rendering with export const prerender = false, or set output: 'server' for the whole project and pre-render only selected pages.

The choice mostly affects operations: static files need no running backend, whereas server rendering needs a runtime that has to be hosted, monitored and kept up to date.

How do you start an Astro project? A short tutorial

  1. Get Node.js ready: the installation guide requires Node.js v22.23.4 or higher; odd-numbered versions such as v23 are not supported.
  2. Create the project: npm create astro@latest starts a wizard that sets the project up for you.
  3. Write pages and components: a page is an .astro file, for example src/pages/index.astro.
  4. Add interactivity where needed: install a UI framework integration and give the relevant component a client: directive.
  5. Build: npm run build generates the site in the dist/ folder.

Here is what an Astro page with one island looks like:

---
// src/pages/index.astro
import Layout from '../layouts/Layout.astro';
import Search from '../components/Search.jsx';
const heading = 'Welcome';
---
<Layout>
  <h1>{heading}</h1>
  <p>This paragraph becomes plain HTML at build time.</p>
  <Search client:visible />
</Layout>

According to the docs, the code between the --- lines is “fenced in”: it never reaches the browser, which is why it can safely contain calls to a private database. The React component Search, on the other hand, loads its JavaScript only once it scrolls into view.

For blog posts, product pages or documentation there are content collections. They manage sets of similar content from local files, remote sources or live data. An optional but recommended Zod schema defines which fields each entry must have, and you get type checking in the editor plus TypeScript type safety for all your content.

What’s new in Astro 7?

Astro 7 was released on June 22, 2026 and is mostly about speed. Minor releases followed up to Astro 7.4 on October 15, 2026, which the astro.build home page lists as the current version.

VersionReleasedMain changes
Astro 6.0March 10, 2026Fonts API, Content Security Policy API, live content collections, redesigned dev server; Vite 7, Zod 4, Node 22 as minimum
Astro 7.0June 22, 2026Compiler rewritten in Rust, Markdown and MDX through a Rust pipeline, queue-based rendering, Vite 8 with Rolldown; route caching stable, experimental CDN cache providers for Netlify, Vercel and Cloudflare
Astro 7.4October 15, 2026astro build --timings shows where build time goes; separate image services for pre-rendered and on-demand pages

In the Astro team’s own benchmarks, Astro 7 builds are 15 to 61% faster. Two things can trip you up when upgrading. The new compiler no longer silently fixes broken HTML: unclosed tags or unterminated attributes now produce errors. And whitespace between elements now follows JSX conventions. The official upgrade tool runs with npx @astrojs/upgrade.

What does the move to Cloudflare mean?

On January 16, 2026, the team announced that the Astro Technology Company, the business behind the framework, was joining Cloudflare; all its full-time staff have since continued working on Astro as Cloudflare employees. The stated commitments: Astro stays open source under the MIT licence, remains actively maintained, keeps supporting a wide range of deployment targets rather than only Cloudflare, and its open governance and roadmap stay in place. If you plan for the long term, it is still worth watching how adapters and the roadmap evolve.

Astro vs. Next.js: which one fits when?

Both frameworks can generate static pages and render pages on a server. The difference is where they start: Astro is built for content-driven websites, while Next.js describes itself as a React framework for full-stack web applications.

CriterionAstroNext.js
Self-descriptionWeb framework for content-driven websitesReact framework for full-stack web applications
Componentsits own .astro components; React, Vue, Svelte, SolidJS, Preact or Alpine.js optionalReact
Defaultpages are pre-rendered at build timepages and layouts are Server Components
JavaScript in the browsernone unless a client: directive creates an islandfor Client Components and client-side navigation between pages
Purely static hostingthe defaultvia output: 'export'; features that need a Node.js server, such as Server Actions, ISR or the default image optimisation, are then unavailable
Server renderingthrough an adapterbuilt in
Natural fit formarketing sites, blogs, documentation, content-heavy shopsweb applications with lots of logic and interaction

A simple rule of thumb: the larger the share of a page that is only read after loading, the better Astro fits. The more users type, filter, drag and watch live data, the more an app framework such as Next.js makes sense.

For context, since you are reading this on rocket-monkeys.com: this website currently runs on Next.js as a static export. The previous version was based on Astro; how it was set up is described in the case study on the previous version of the site.

What about WordPress?

WordPress works differently from both frameworks: it runs permanently on a server with a database. The recommended setup is PHP 8.3 or newer and MariaDB 10.11 or MySQL 8.0 or newer. If you need an editorial interface but want to deliver static pages, you can load content from a headless CMS into Astro; content collections can also pull content from remote sources.

Strengths and limits of Astro

Strengths

  • Finished HTML from the first request: Google recommends server-side or pre-rendering because it makes sites faster for users and crawlers, and not all bots can run JavaScript.
  • A good starting point for Core Web Vitals: JavaScript that is never shipped does not have to be downloaded or executed. Google uses Core Web Vitals in its ranking systems; see Core Web Vitals 2026: what actually matters.
  • Free choice of UI library: React, Vue, Svelte and others can be mixed or left out entirely.
  • Structured content: content collections validate entries against a schema and provide type safety.
  • Simple operations by default: static output needs no server runtime.

Limits

  • Highly interactive applications: if almost every part of the page has to react, it ends up made of many islands. A framework designed around in-browser interaction from the start is often the more direct route.
  • Per-request personalisation needs a server: on-demand rendering and server islands require an adapter and therefore a runtime.
  • Its own syntax: your team has to learn .astro components and directives, and since Astro 7 the compiler is stricter about broken HTML.
  • A company behind it: Astro’s full-time staff have worked at Cloudflare since January 2026. The licence remains MIT, but keep an eye on roadmap decisions.

Checklist: is Astro right for your project?

  • Does the website consist mostly of content that people read?
  • Are load time and search visibility business-critical?
  • Can interactive parts be limited to individual components?
  • Does content come from Markdown, a headless CMS or APIs?
  • Is static hosting enough for most pages?

Five yeses: Astro is an obvious candidate. If large parts of the application need logins, live data and heavy interaction, look at an app framework such as Next.js instead.

Conclusion: Astro for content, app frameworks for applications

Astro is under active development in 2026: HTML by default, JavaScript only for islands, static or server-rendered, currently at version 7. For websites that are mainly read, that is a strong foundation; for highly interactive applications, an app framework is the closer fit. What matters is how much of your website still has work to do after it has loaded.

Websites and relaunches, including headless CMS setups, are part of our software development service. We typically work with web frameworks such as Next.js or Astro there and choose the stack based on requirements and operations. Which route suits your project is something you can clarify in a free 20-minute initial call.

Sources

  1. Why Astro? – Astro Docs, accessed November 4, 2026
  2. Islands architecture – Astro Docs, accessed November 4, 2026
  3. Template directives reference – Astro Docs, accessed November 4, 2026
  4. On-demand rendering – Astro Docs, accessed November 4, 2026
  5. Astro 7.0 – Astro Blog, June 22, 2026
  6. Astro 7.4 – Astro Blog, October 15, 2026
  7. The Astro Technology Company joins Cloudflare – Astro Blog, January 16, 2026
  8. How to create a static export of your Next.js application – Next.js Docs, accessed November 4, 2026

Responsible

Mehdi Bornak, AI Manager (IHK)

Mehdi Bornak is the owner of Rocket-Monkeys and an IHK-certified AI manager. Rocket-Monkeys was founded in 2022 and builds custom software and AI solutions for companies.

More about us

Frequently asked questions

Frequently asked questions

01What is the Astro framework?

Astro is an open-source web framework for content-driven websites such as blogs, marketing sites and documentation. By default it renders pages to HTML at build time and sends no JavaScript to the browser. Interactive parts are added as islands: components from React, Vue, Svelte or other UI frameworks that a client: directive hydrates selectively in the browser.

02Is Astro free?

Yes. Astro is released under the MIT licence and can be used, modified and distributed free of charge. Since January 16, 2026, the company behind Astro has been part of Cloudflare. The team has committed that Astro stays open source under the MIT licence, keeps supporting many hosting targets, and that its open governance and roadmap remain in place.

03What is the latest version of Astro?

The current major version is Astro 7, released on June 22, 2026 with a compiler rewritten in Rust, a Rust pipeline for Markdown and MDX, and Vite 8. The latest minor release is Astro 7.4 from October 15, 2026. Upgrade existing projects with npx @astrojs/upgrade; start new ones with npm create astro@latest.

04Astro or Next.js: which is better?

It depends on the project. Astro is built for content-driven websites and ships HTML without JavaScript by default. Next.js is a React framework for full-stack web applications built on Server Components. Rule of thumb: if a page is mostly read after loading, Astro fits; if users constantly work with forms, filters and live data, Next.js is the closer match.

Let’s talk about your project.

20 minutes, free and without obligation – with a person from the team.