Koskamo

Astro components and frontmatter

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

Astro components are the basic building blocks of any Astro project: HTML-only templating components with no client-side runtime, using the .astro file extension. A component can range from an HTML snippet to a full page layout, or, when located in the special src/pages/ folder, an entire page itself. Components never render on the client; they render to HTML at build-time or on-demand. JavaScript in the component frontmatter is stripped from the final page, adding zero JavaScript footprint by default. For interactivity, add standard HTML <script> tags or UI framework components as “client islands”; a server directive defers personalized content into “server islands” without delaying the page load. Each component has a Component Script inside a code fence (---) and a Component Template. Scope: Astro. Reviewed October 4, 2026.

Source and provenance

Original source
docs.astro.build
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.