Astro.js is a modern web development framework that allows developers to create fast and lightweight websites.
Astro is a modern, JS-based framework with a mission to build fast, content websites. What makes it different than other frameworks is that it is a multi-page app (or MPA) framework. Astro isn’t the only MPA framework out there, but you’re probably used to them using some server-side language like PHP. Astro is just HTML, CSS, and JavaScript.
But with Astro you don’t ship any JavaScript; it’s only used for the build, and the output from Astro is a static site. However, if you want to use JavaScript to hydrate part of your templates dynamically, you can do that, too.
Astro also lets you BYOF or “Bring Your Own Framework.” You can use React, Svelte, Vue, or any modern JS framework you’re comfortable with.
Some of the key features of Astro.js include:
But the best thing about Astro, especially for developers used to working in Craft CMS, is that it is approachable and straightforward. The tooling isn’t complex (built on Vite), and the templating via Astro Components can be as simple as you want. The ability to choose your content course (from Markdown to GraphQL) makes it flexible and the first JavaScript framework you should try if you haven’t used one before.
That being said, Astro isn’t a “sprinkle framework” like petite-vue or Alpine.js. We’re not using it to add reactivity to our site or application pages. Instead, we’re using Astro to build an entire site, shipping zero or near-zero JavaScript and having an enjoyable developer experience while we’re doing it.
To learn more about Astro, check out our Astro Quick-Start Guide video course.