Framework1M+/wkMIT

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
npm install astro
yarn
yarn add astro
pnpm
pnpm add astro

Import

ESM
---
// Astro frontmatter
---

Quick Example

usage
---
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

Packageastro
CategoryFramework
Weekly Downloads1M+
LicenseMIT
Installnpm install astro

Related Packages

Browse npm Packages by Category

Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.