HomeHTML Template for Astro
Astro Templates

HTML Templates for Astro Projects

Every UIXDraft template works as an Astro component out of the box. Copy the markup, add frontmatter, ship zero-JS static pages.

Get 180+ Templates — $35

Why HTML Templates Are a Perfect Astro Match

Astro's architecture is built around HTML-first content. Its .astro component format is essentially enhanced HTML — paste any template markup directly into an Astro file and it ships as static HTML with zero runtime JavaScript by default.

Zero JS Default

Island Architecture

Astro ships zero JS by default. HTML templates become fully static pages — fastest possible load times.

Content Collections

Blog & Docs Ready

Pair blog templates with Astro Content Collections for type-safe, auto-routed markdown-powered pages.

View Transitions

Smooth Navigation

Add Astro's built-in View Transitions API to any HTML template for silky page animations without writing animation code.

SSG + SSR

Deploy Anywhere

Build static with SSG or enable SSR per-route. HTML templates work identically in both modes.

How to Use an HTML Template in Astro

1

Create an Astro Component

Create src/components/Hero.astro. The file is split into a frontmatter block (---) and HTML template below.

2

Paste the HTML Template

Copy the HTML body content into the template section. Move <style> tags to the bottom — Astro scopes them automatically.

3

Pass Props via Frontmatter

Define props in the frontmatter: const {'{ title, subtitle }'} = Astro.props. Use in template with {'{title}'}.

4

Use in Pages

Import into any src/pages/*.astro file. Astro handles routing, SSG, and asset optimization automatically.

Template Categories Best Suited for Astro

Blog

Blog & Documentation

Article and blog templates combined with Astro Content Collections create fully type-safe, SEO-optimized blogs.

Marketing

Marketing Landing Pages

Astro ships zero JS — marketing templates load instantly and score perfect Core Web Vitals right out of the box.

Portfolio

Portfolio Sites

Static portfolio templates deploy to any CDN with astro build. No server required, no cold starts.

E-Commerce

E-Commerce Storefronts

Product listing templates work with Astro SSR adapters for Vercel/Netlify with dynamic cart islands.

Astro Performance vs Other Frameworks

MetricAstro + HTML TemplateNext.jsNuxt
Default JS shipped0 KB~85 KB~95 KB
HTML template compatibilityDirect pasteJSX requiredMinor changes
Lighthouse score (static)100 / 10085–9585–95
Build outputPure HTML filesJS bundlesJS bundles

Get All 180+ Templates — $35 One-Time

Commercial licence · No subscription · Instant download · Lifetime updates

Download All 180+ Templates — $35
One payment · Own the files forever · Used by 500+ agencies worldwide

Frequently Asked Questions

Can I use HTML templates directly in Astro components?
Yes. Paste the HTML into the template section of a .astro file and move the CSS into a scoped