A minimal, modern starter template for building fast websites with Astro. This template includes everything you need to get started with a beautiful landing page, complete with animations, icons, and content management capabilities.
- π Astro - Lightning-fast static site generation
- βοΈ React - Component-based UI library for interactive components
- π¨ Tailwind CSS v4 - Utility-first CSS framework for rapid styling
- π Framer Motion - Smooth scroll reveal animations with spring physics
- π― Astro Icons - Beautiful icon component library with Tabler icon set
- π MDX - Write JSX in your Markdown documents
- π Sass - CSS preprocessor with variables, mixins, and nesting
- π Tailwind Typography - Beautiful typography styles for markdown content
- Astro
^5.16.6- The web framework for content-driven websites
- @astrojs/react
^4.4.2- React integration for Astro - @astrojs/mdx
^4.3.13- MDX support for writing JSX in Markdown - astro-icon
^1.1.5- Icon component library
- tailwindcss
^4.1.18- Utility-first CSS framework - @tailwindcss/vite
^4.1.18- Tailwind CSS Vite plugin - @tailwindcss/typography
^0.5.19- Typography plugin for beautiful markdown styling - sass
^1.97.2- CSS preprocessor
- framer-motion
^12.24.7- Production-ready motion library for React - react
^19.2.3- UI library - react-dom
^19.2.3- React DOM renderer
- @iconify-json/tabler
^1.2.26- Tabler icon set for astro-icon
/
βββ public/
β βββ favicon.svg
βββ src/
β βββ assets/ # Static assets (images, SVGs)
β βββ components/ # Reusable Astro components
β β βββ CTA.astro # Call-to-action section
β β βββ Features.astro # Features showcase
β β βββ Footer.astro # Site footer
β β βββ Header.astro # Site header/navigation
β β βββ Hero.astro # Hero section
β β βββ ScrollReveal.tsx # Scroll animation component
β β βββ SassExample.astro # Sass usage example
β βββ layouts/
β β βββ Layout.astro # Base page layout
β βββ pages/ # Routes (file-based routing)
β β βββ index.astro # Homepage
β β βββ about.astro # About page
β β βββ contact.astro # Contact page
β β βββ features.astro # Features page
β β βββ example.mdx # MDX example page
β βββ styles/
β βββ global.css # Global styles & Tailwind imports
β βββ example.scss # Sass example file
βββ astro.config.mjs # Astro configuration
βββ tailwind.config.mjs # Tailwind configuration
βββ package.json
- Node.js 18+
- npm, pnpm, or yarn
-
Clone the repository
git clone https://github.com/jonnysmillie/astro-base.git cd astro-base -
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:4321
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally |
npm run astro |
Run CLI commands like astro add, astro check |
This project uses Tailwind CSS v4 for styling. All components use Tailwind utility classes.
Global Styles:
- Located in
src/styles/global.css - Imports Tailwind CSS
- Includes Tailwind Typography plugin for markdown styling
Configuration:
tailwind.config.mjs- Tailwind configuration with Typography plugin
Sass is installed and ready to use. You can use Sass in component <style> blocks:
<style lang="scss">
$primary-color: #000;
.my-component {
color: $primary-color;
}
</style>See src/components/SassExample.astro for a complete example.
A React component using Framer Motion for scroll-triggered animations:
import ScrollReveal from "./ScrollReveal.tsx";
<ScrollReveal client:load delay={0.2} scale={true}>
<div>Your content here</div>
</ScrollReveal>;Props:
delay- Animation delay in seconds (default: 0)direction- Animation direction: "up" | "down" | "left" | "right" (default: "up")distance- Distance to travel in pixels (default: 50)scale- Enable scale animation (default: false)
Use Tabler icons with astro-icon:
---
import { Icon } from "astro-icon/components";
---
<Icon name="tabler:heart" class="w-6 h-6" />Browse available icons at Tabler Icons.
Write JSX in your Markdown documents. Create .mdx files in the src/pages directory:
---
import Layout from "../layouts/Layout.astro";
---
<Layout>
# My MDX Page This is **markdown** with <Component /> support!
</Layout>See src/pages/example.mdx for a complete example.
- / - Homepage with hero, features, and CTA sections
- /features - Features showcase page
- /about - About page
- /contact - Contact form page
- /example - MDX example page demonstrating markdown features
export default defineConfig({
integrations: [
react(), // React support
icon(), // Astro Icons
mdx(), // MDX support
],
vite: {
plugins: [tailwindcss()],
},
});import typography from "@tailwindcss/typography";
export default {
plugins: [typography],
};- Astro - Web framework
- React - UI library for interactive components
- Tailwind CSS - Utility-first CSS framework
- @astrojs/react - React integration
- @astrojs/mdx - MDX support
- astro-icon - Icon component library
- @tailwindcss/typography - Typography plugin
- sass - CSS preprocessor
- framer-motion - Motion library
- @iconify-json/tabler - Tabler icon set
- Black & White Color Scheme - Minimal, clean design
- Responsive Layout - Mobile-first approach
- Smooth Animations - Scroll reveal effects with spring physics
- Modern Typography - Beautiful text styling with Tailwind Typography
- Component-Based - Reusable, modular components
- Astro Documentation
- Tailwind CSS Documentation
- Framer Motion Documentation
- Astro Icons Documentation
- MDX Documentation
This project is open source and available under the MIT License.
Built with:
Ready to build something amazing? Download this template and start creating!