π Astro 5 + Shadcn/UI + Tailwind v4 Starter Kit
A lightning-fast starter template combining Astroβs performance with Shadcnβs beautiful components and Tailwind CSS v4βs modern CSS-based configuration.
β¨ Whatβs Inside
- Astro 5.14+ - Lightning-fast static site generation
- React 19 - Latest React with improved performance
- Tailwind CSS v4 - Modern CSS-based configuration
- Shadcn/UI - Complete component library (40+ components)
- TypeScript - Full type safety
- Dark Mode - Beautiful theme switching
- 100/100 Lighthouse - Perfect performance scores
π¨ Screenshots

β‘ Quick Start
# Clone the repository
git clone https://github.com/one-ie/astro-shadcn.git
# Navigate to project
cd astro-shadcn
# Install dependencies
npm install
# Start development server
npm run dev
Visit http://localhost:4321 - Youβre ready to go! π
π¨ Pre-installed Components
All Shadcn/UI components are pre-configured for Astro:
---
// Example usage in .astro file
import { Button } from "@/components/ui/button"
import { Card } from "@/components/ui/card"
---
<Button>Click me!</Button>
Available Components
- β Accordion
- β Alert Dialog
- β Avatar
- β Badge
- β Button
- β Card
- β Dialog
- β¦ and more!
π οΈ Project Structure
your-project/
βββ src/
β βββ components/
β β βββ ui/ # All Shadcn components (40+)
β βββ layouts/
β β βββ Layout.astro # Base layout with theme support
β βββ pages/
β β βββ index.astro # Homepage
β βββ styles/
β βββ global.css # Tailwind v4 config with @theme blocks
βββ astro.config.mjs # Astro + @tailwindcss/vite config
βββ components.json # Shadcn/ui configuration
Using Components
---
// src/pages/index.astro
import { Button } from "@/components/ui/button";
import { Card, CardHeader, CardTitle } from "@/components/ui/card";
---
<Card>
<CardHeader>
<CardTitle>Welcome to Astro + Shadcn!</CardTitle>
</CardHeader>
<Button client:load>Interactive Button</Button>
</Card>
π Development Workflow
-
Start Development
npm run dev -
Using React Components in Astro
--- // Always add client:load for interactive components import { Dialog } from "@/components/ui/dialog" --- <Dialog client:load> <!-- Dialog content --> </Dialog> -
Build for Production
npm run build npm run preview # Test the production build
π Troubleshooting
Common Issues Solved
β
Component Hydration: All interactive components use client:load
β
Build Warnings: Suppressed in configuration
β
Path Aliases: Pre-configured for easy imports
β
React Integration: Properly set up for Shadcn
π‘ Pro Tips
-
Component Usage in Astro
--- // Always import in the frontmatter import { Button } from "@/components/ui/button" --- <!-- Use in template --> <Button client:load>Click me!</Button> -
Styling with Tailwind v4
<!-- Use semantic color names that work in both light and dark modes --> <div class="bg-background text-foreground border border-border"> <Button class="m-4">Styled Button</Button> </div> -
Layout Usage
--- import Layout from '../layouts/Layout.astro'; --- <Layout title="Home"> <!-- Your content --> </Layout>
π Performance & Screenshots
β‘ Lighthouse Scores

Perfect scores across all metrics:
- π Performance: 100
- βΏ Accessibility: 100
- π§ Best Practices: 100
- π SEO: 100
π Quick Links
π€ Need Help?
- Join Astro Discord
- Check Astro Documentation
- File an Issue on GitHub
Built with π Astro 5, β‘ Tailwind v4, βοΈ React 19, and π¨ Shadcn/UI by ONE