Tailwind CSS Landing Page with Dark Mode - Stone
A free Astro theme for business, marketing, SaaS and startup sites. Includes dark mode, responsive design and view transitions.
By m6v3l9 m6v3l9/astro-theme-stone 265 stars
Introduction
Stone is an open‑source Astro theme built with Tailwind CSS and Alpine.js. It is aimed at business, marketing, SaaS and startup landing pages. The theme includes more than five pages, a collection of sections, dark‑mode support (via Tailwind’s class strategy), view transitions, and a lightweight design.
What this project offers
- A ready‑made landing‑page layout that can be customized for different business needs.
- Pre‑configured Tailwind CSS utilities and a color palette based on the
stonecolor set. - Alpine.js integration for simple interactive components.
- View‑transition support through Astro’s experimental API.
- A set of static assets (images, icons, favicons) placed in the
publicfolder.
Main features
- 5+ pages (home, about, contact, pricing, etc.)
- 15+ reusable sections
- Dark & light mode (controlled by a CSS class)
- Fully responsive layout (Tailwind breakpoints)
- Experimental view transitions
- Fast and lightweight build output
- Google Font Inter and Remix Icons included
Technology stack
- Astro 2.10.13 – static site generator
- Tailwind CSS 3.3.3 – utility‑first styling framework
- Alpine.js 3.12.3 – lightweight JavaScript interactions
- TypeScript – type‑checked source files
- Prettier – code formatting
- astro-compress – HTML compression for production
Requirements
- Node.js 18 or newer
- npm (comes with Node.js)
Installation
- Download the project archive
# The archive is provided at /download/stone-astro-theme.zip
# Save it to a convenient location and unzip it
unzip stone-astro-theme.zip -d stone-astro-theme
cd stone-astro-theme
- Install dependencies
npm install
- Run the development server (optional, to preview locally)
npm run dev
Open http://localhost:3000 in a browser to see the site.
- Build for production
npm run build
The command executes astro build. The generated static files are placed in the dist/ directory.
- Preview the built site (optional)
npm run preview
This serves the contents of dist/ locally.
Configuration
- Tailwind configuration – edit
tailwind.config.cjsto change colors, fonts, or extend the utility set. - Astro configuration –
astro.config.mjscontains the view‑transition experimental flag and the list of integrations (Tailwind and astro‑compress). - TypeScript settings –
tsconfig.jsonextends Astro’s strict configuration; modify if you need custom compiler options.
Customizing the project
- Pages – add, remove, or edit files in
src/pages/. Each.astrofile becomes a route based on its filename. - Components – reusable UI pieces live in
src/components/. Create new components or modify existing ones to change the look of sections. - Assets – place images, icons, or other static files in
public/. They are served unchanged at the site root. - Styling – use Tailwind utility classes directly in
.astrofiles or extend thethemesection oftailwind.config.cjsfor custom design tokens.
Project structure
/
├── LICENSE
├── README.md
├── astro.config.mjs
├── package-lock.json
├── package.json
├── tailwind.config.cjs
├── tsconfig.json
├── public/
│ ├── android-chrome-192x192.png
│ ├── android-chrome-512x512.png
│ ├── apple-touch-icon.png
│ ├── assets/
│ │ ├── about.webp
│ │ ├── hero.webp
│ │ ├── logo-inverted.svg
│ │ ├── logo.svg
│ │ └── (other images)
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── favicon.ico
│ └── site.webmanifest
└── src/
├── components/
│ ├── about/
│ ├── contact/
│ ├── home/
│ ├── layout/
│ └── pricing/
├── env.d.ts
├── layouts/
│ └── Layout.astro
└── pages/
├── 404.astro
├── about.astro
├── contact.astro
├── index.astro
├── pricing.astro
├── privacy.astro
└── styleguide.astro
Tips
- Run
npm run devwhile editing components to get hot‑reloading and instant feedback. - After building, the
dist/folder contains only static HTML, CSS, and JavaScript; it can be deployed to any static‑host (Netlify, Vercel, GitHub Pages, etc.). - To change the default font, edit the
fontFamily.sansentry intailwind.config.cjsand reinstall the corresponding@fontsourcepackage if needed. - The
astro-compressintegration automatically minifies HTML output; you can disable it by removing thecompress()call inastro.config.mjs.
License and attribution
The Stone theme is licensed under the MIT License. See the full license file at the repository root.
Original repository: https://github.com/m6v3l9/astro-theme-stone
When redistributing or publishing a site built with this theme, keep the LICENSE file and retain credit to the original author as required by the MIT license.
Use this prompt with an AI coding assistant (Claude Code, Cursor, Copilot, ChatGPT and similar).
- Download the ZIP and extract it where your new project will live.
- Download the ZIP and extract it next to your project, so the assistant can read both.
- Fill in the bracketed parts under “About my project”.
- Paste the prompt into your assistant and review each change it proposes.
# Start a new project with Stone ## Your task You are a senior frontend engineer. We are building a new project using Stone, a landing page built with Tailwind CSS 3, as the starting point. Keep its design and turn the demo into a clean, real codebase that I can maintain. ## About my project - What I'm building and for whom: [describe it] - Pages I need: [list them] - Stack: [keep it as it is, with its own build, or name one: Vite / Laravel / Next.js / Astro] - Brand: [name, colours, fonts, logo] # Stone — project brief ## Source project Stone is a free Astro theme built with Tailwind CSS v3 and Alpine.js v3. It provides a landing‑page style site for business, marketing, SaaS and startup projects. Repository: https://github.com/m6v3l9/astro-theme-stone – licensed under MIT (see LICENSE, author m6v3l9). ## Files that matter - **Pages (entry page is `src/pages/index.astro`)** - `src/pages/index.astro` – home page, shows hero, sections, view transitions. - `src/pages/about.astro` – about page. - `src/pages/contact.astro` – contact page. - `src/pages/pricing.astro` – pricing page. - `src/pages/404.astro` – not‑found page. - `src/pages/privacy.astro` – privacy policy. - `src/pages/styleguide.astro` – style guide page. - **Components** – reusable UI pieces under `src/components/` (e.g., `about/`, `contact/`, `home/`, `layout/`, `pricing/`). - **Layouts** – shared page wrapper in `src/layouts/Layout.astro`. - **Stylesheets** – Tailwind CSS is generated from `tailwind.config.cjs`; no separate CSS files in the repo. - **Scripts** – Alpine.js is imported via the `alpinejs` package; additional Alpine collapse plugin `@alpinejs/collapse` is available. - **Images & fonts** – static assets in `public/` (icons, favicons, `assets/hero.webp`, `assets/about.webp`, team photos, logos) and the Inter font from `@fontsource/inter`. - **Configuration files** – `astro.config.mjs`, `tailwind.config.cjs`, `tsconfig.json`, `.prettierrc` (not listed but present), `package.json`, `package-lock.json`. ## Setup and build The project requires a build step with Astro. ```bash # Install dependencies npm install # Development server npm run dev # or npm start # Production build npm run build # Preview the built site npm run preview ``` The production output is written to the `./dist/` folder. ## How it is put together - **Layout structure**: `src/layouts/Layout.astro` provides the outer shell (head, header, footer) that all pages import. Each page composes sections from the component folders (`home/`, `about/`, `pricing/`, etc.). - **Repeated elements**: Header, footer, and navigation are shared via the layout. Section components are reused across multiple pages. - **Libraries**: - **Astro 2.10.13** – static site generator, handles routing and component rendering. - **Tailwind CSS 3.3.3** – utility‑first styling; color palette defined in `tailwind.config.cjs` (primary = `colors.stone`). Dark mode is enabled via the `class` strategy (`darkMode: 'class'`). - **Alpine.js 3.12.3** – client‑side interactivity; the collapse plugin (`@alpinejs/collapse`) is installed for dropdowns/accordions. - **@fontsource/inter** – provides the Inter font family referenced in `tailwind.config.cjs`. - **JavaScript initialization**: Alpine.js is automatically activated on pages that include its directives (`x-data`, `x-show`, etc.). No manual initialization code is required beyond the package import. - **Theme values**: Colors and fonts are defined in `tailwind.config.cjs`. Dark mode toggling works by adding/removing the `dark` class on the `<html>` element (handled by Alpine or custom script if added). - **Responsive design**: Tailwind’s responsive utilities are used throughout; the README claims full responsiveness, and the Tailwind config includes default breakpoints. - **View transitions**: Enabled via Astro’s experimental `viewTransitions` flag in `astro.config.mjs`. ## Watch out for 1. **Dark mode flag** – Tailwind is configured for class‑based dark mode, but the repo does not include a UI toggle; adding one must manage the `dark` class on `<html>`. 2. **Alpine collapse plugin** – the plugin is installed but not imported in any component; ensure you import it (`import '@alpinejs/collapse'`) where needed. 3. **Tailwind content paths** – the `content` array only scans `./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}`; if you add new file types (e.g., `.tsx` components), update the config. 4. **Static assets** – all images are in `public/`; referencing them with a leading slash (`/assets/hero.webp`) is required, otherwise the build may produce broken links. 5. **No explicit CSS files** – custom styles must be added via Tailwind’s `extend` section or inline utilities; adding a separate CSS file without updating the Tailwind config will be ignored. 6. **View transitions experimental** – the `experimental.viewTransitions` flag may change in future Astro releases; test in target browsers. ## Verify - [ ] Home page (`/`) renders hero section, navigation, and view‑transition script without console errors. - [ ] All listed pages (`about`, `contact`, `pricing`, `privacy`, `styleguide`, `404`) load and display their respective components. - [ ] Alpine.js directives work (e.g., any collapsible menus or accordions respond). - [ ] Dark mode toggling (if added) correctly adds the `dark` class and switches Tailwind colors. - [ ] Responsive breakpoints adjust layout on mobile, tablet, and desktop widths. - [ ] No duplicate loading of Alpine.js or Tailwind CSS in the built HTML. - [ ] The `dist/` folder contains the compiled site after `npm run build`. - [ ] License file (`LICENSE`) is present in the final distribution and credits the MIT license. # How to work ## Step 1 — Get it running as it is Start from the downloaded ZIP or a clone of the repository. Install the dependencies and start the dev server with the exact commands in "Setup and build" above. Confirm it runs without console errors before changing anything. ## Step 2 — Plan the project with me List the pages and sections of Stone to keep, rename or remove for my project, the folder structure you propose for my stack, and where the repeated parts will live. Wait for my OK. ## Step 3 — Build it - Write the real copy for each section and remove sections I don't need. - Make every form submit somewhere real (or a clearly marked placeholder), and add page titles, meta descriptions and social images. - Put my brand name, colours and fonts where Stone defines its theme (see "How it is put together" above), not as one-off overrides. - Keep Tailwind CSS's markup patterns and class conventions so the design stays consistent, and don't change its major version unless I ask. ## Step 4 — Polish and launch - Remove demo content and every CSS/JS file nothing uses any more; optimise images. - Check phone, tablet and desktop widths, labels, alt text, keyboard focus and colour contrast. - Run the production build and tell me which folder to deploy. - Keep the license file and credit the author of Stone. ## Ground rules Work in small steps and show me each change. Use only the libraries already in the project unless I agree to add one.



