A production-ready Astro starter template with everything you need to build modern websites. Beautiful UI components, forms, dark mode, and best practices included.
š Live Demo | š¦ Use Template
Get your project running in under 60 seconds:
# Option 1: Use GitHub template (recommended)
# Click "Use this template" button on GitHub
# Option 2: Clone with degit
npx degit casoon/astro-v5-template my-awesome-project
cd my-awesome-project
# Install and start
npm install
npm run dev
Open http://localhost:4321 - You're ready to build! š
No more building from scratch. This template includes:
my-project/
āāā src/
ā āāā components/ # Ready-to-use UI components
ā ā āāā Hero.astro # Hero section with CTAs
ā ā āāā Navbar.astro # Responsive navigation
ā ā āāā Card.astro # Flexible card component
ā ā āāā ContactForm.astro # Full contact form
ā ā āāā Newsletter.astro # Email signup
ā ā āāā Modal.astro # Dialog/popup system
ā ā āāā Toast.astro # Notification system
ā āāā pages/
ā ā āāā api/ # Backend endpoints
ā ā ā āāā contact.ts # Form submission handler
ā ā ā āāā newsletter.ts # Newsletter signup
ā ā āāā blog/ # Blog with MDX
ā ā āāā index.astro # Homepage
ā ā āāā contact.astro # Contact page example
ā āāā layouts/ # Page templates
ā āāā content/ # Blog posts (MDX)
Command | Description |
---|---|
npm run dev |
Start dev server on port 4321 |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run check |
Run all checks before commit |
npm run update-deps |
Update all dependencies safely |
Edit environment variables in .env
:
PUBLIC_SITE_NAME="My Awesome Site"
PUBLIC_SITE_URL="https://mysite.com"
The template uses a purple/blue theme. To change:
src/pages/index.astro
src/content/blog/
src/layouts/BaseLayout.astro
Works out-of-the-box with:
<Hero
title="Welcome to My Site"
subtitle="Build something amazing"
ctaText="Get Started"
ctaLink="/contact"
/>
<!-- Default Card -->
<Card
title="Feature"
description="This is a feature"
href="/learn-more"
/>
<!-- Glass Effect Card -->
<Card
variant="glass"
title="Premium Feature"
/>
// Show success message
window.showToast('Form submitted!', 'success');
// Show error
window.showToast('Something went wrong', 'error');
npm run build
# Upload 'dist' folder to your host
Found a bug? Have a feature request? PRs welcome!
MIT License - feel free to use this template for any project!
Built with ā¤ļø by the Astro community
ā Star this repo if it helped you!