astro-v5-template Svelte Themes

Astro V5 Template

Production-ready Astro 5 starter template with Tailwind CSS v4, Atlas Design System, Svelte 5, and ready-to-use components

šŸš€ Astro V5 Template - Modern Web Starter

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


⚔ Quick Start

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! šŸŽ‰


šŸŽÆ Why This Template?

āœ… Production-Ready Components

No more building from scratch. This template includes:

  • Hero Section with animated backgrounds
  • Responsive Navbar with mobile menu & glass effect on scroll
  • Contact Form with validation & API integration
  • Card Components (4 variants: default, glass, gradient, outline)
  • Newsletter Signup with success states
  • Modal System with backdrop blur
  • Toast Notifications for user feedback
  • 404 Page with animations

āœ… Modern Tech Stack

  • Astro 5 - Ship 0KB JavaScript by default
  • Tailwind CSS v4 - Latest utility-first CSS
  • Atlas Design System - Beautiful glass effects & gradients
  • Svelte 5 - Interactive islands with runes API
  • TypeScript - Full type safety

āœ… Developer Experience

  • Hot Module Reload - Instant feedback
  • Pre-configured Linting - Biome + Prettier
  • Git Hooks - Auto-format on commit
  • VS Code Ready - Optimal settings included
  • Type-Safe Environment - Validated with Zod

šŸ“¦ What's Included

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)

šŸ› ļø Available Commands

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

šŸŽØ Customization Guide

1ļøāƒ£ Update Site Info

Edit environment variables in .env:

PUBLIC_SITE_NAME="My Awesome Site"
PUBLIC_SITE_URL="https://mysite.com"

2ļøāƒ£ Customize Colors

The template uses a purple/blue theme. To change:

  1. Update Tailwind colors in components
  2. Atlas gradients use CSS variables (customizable)

3ļøāƒ£ Add Your Content

  1. Replace homepage content in src/pages/index.astro
  2. Add blog posts to src/content/blog/
  3. Update navigation in src/layouts/BaseLayout.astro

4ļøāƒ£ Deploy

Works out-of-the-box with:

  • Vercel (recommended)
  • Netlify
  • Cloudflare Pages
  • Any static host

šŸ“š Component Examples

Hero Section

<Hero 
  title="Welcome to My Site"
  subtitle="Build something amazing"
  ctaText="Get Started"
  ctaLink="/contact"
/>

Cards

<!-- Default Card -->
<Card 
  title="Feature"
  description="This is a feature"
  href="/learn-more"
/>

<!-- Glass Effect Card -->
<Card 
  variant="glass"
  title="Premium Feature"
/>

Toast Notifications

// Show success message
window.showToast('Form submitted!', 'success');

// Show error
window.showToast('Something went wrong', 'error');

šŸ”§ Tech Stack Details

Frontend

  • Astro 5.0 - Static site generator with islands
  • Tailwind CSS v4 - Utility-first CSS (beta)
  • Svelte 5 - For interactive components
  • TypeScript - Type safety everywhere

Styling

  • Atlas Design System - Glass morphism & animations
  • Dark Mode - System preference + manual toggle
  • Responsive - Mobile-first approach

Developer Tools

  • Biome - Fast linter/formatter
  • Prettier - For Astro/Svelte files
  • Husky - Git hooks
  • GitHub Actions - CI/CD ready

šŸš€ Deployment

Manual Deploy

npm run build
# Upload 'dist' folder to your host

šŸ’” Tips & Best Practices

  1. Keep it Fast - Astro ships 0 JS by default. Add interactivity only where needed.
  2. Use Atlas Wisely - Glass effects look best on colorful backgrounds
  3. Type Everything - Full TypeScript support is configured
  4. Mobile First - All components are responsive by default

šŸ“– Documentation


šŸ¤ Contributing

Found a bug? Have a feature request? PRs welcome!

  1. Fork the repository
  2. Create your feature branch
  3. Commit changes
  4. Push to the branch
  5. Open a Pull Request

šŸ“„ License

MIT License - feel free to use this template for any project!


Built with ā¤ļø by the Astro community

⭐ Star this repo if it helped you!

Top categories

Loading Svelte Themes