astro
Astro is a modern web framework designed for building content-driven websites like blogs, documentation, marketing sites, and portfolios with excellent performa…
Installation
npm install astro
yarn add astro
pnpm add astro
Import
--- // Astro frontmatter ---
Quick Example
---
const title = 'Hello Astro';
---
<html>
<body>
<h1>{title}</h1>
</body>
</html>About astro
Astro is a modern web framework designed for building content-driven websites like blogs, documentation, marketing sites, and portfolios with excellent performance. Its key innovation is the islands architecture, which renders pages to static HTML by default and only hydrates interactive components when needed, resulting in minimal JavaScript shipped to the browser. Astro supports using components from any UI framework — React, Vue, Svelte, Preact, Solid, or plain HTML — within the same project, making it uniquely flexible for teams with mixed framework experience. Astro files use a frontmatter-style syntax with a code fence for server-side JavaScript and an HTML-like template section below. The framework includes built-in content collections for managing Markdown and MDX content with type-safe schemas, image optimization, view transitions for page animations, and middleware support. Astro can deploy as a fully static site or use server-side rendering with adapters for Node.js, Deno, Cloudflare, Vercel, and Netlify. It consistently produces the smallest bundle sizes among modern frameworks.
Quick Facts
| Package | astro |
| Category | Framework |
| Weekly Downloads | 1M+ |
| License | MIT |
| Install | npm install astro |
Related Packages
Next.js is the leading React framework for building full-stack web applications, developed and maint…
Svelte is a radical new approach to building user interfaces that shifts the work of the framework f…
React is the most popular JavaScript library for building user interfaces, developed and maintained …
Vue.js is a progressive JavaScript framework for building user interfaces, created by Evan You in 20…
Gatsby is a React-based static site generator and framework that leverages GraphQL for data manageme…
Browse npm Packages by Category
Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.