Tailwind CSS Landing Page with Dark Mode - Play
A free Tailwind CSS template for startups, SaaS and business sites, featuring dark mode and responsive design.
By TailGrids tailgrids/play-tailwind 1,158 stars
Introduction
Play is a free Tailwind CSS landing‑page template designed for startups, SaaS and business sites. It includes dark‑mode support, responsive layouts and several ready‑made pages such as home, about, pricing, blog and contact.
What this project offers
- A complete set of static HTML pages that can be used immediately.
- Dark‑mode toggle that works out of the box.
- Responsive design that adapts to mobile, tablet and desktop screens.
- Pre‑styled components built with Tailwind CSS 4, including a hero section, pricing tables, blog grid and contact form.
Main features
- Dark mode
- Responsive layout
- Multiple ready‑made pages (home, about, pricing, blog‑grid, blog‑details, contact, sign‑in, sign‑up, 404)
- Swiper slider integration (assets/css/swiper‑bundle.min.css, assets/js/swiper‑bundle.min.js)
- WOW.js scroll animations (assets/js/wow.min.js) and Animate.css (assets/css/animate.css)
Technology stack
- Tailwind CSS 4
- PostCSS 8.5.3
- Swiper.js (CSS & JS)
- WOW.js
- Animate.css
- Plain HTML, CSS and JavaScript (no framework)
Requirements
- A modern web browser for viewing the pages.
Installation
- Download and extract the project archive.
# Assuming the ZIP file is in your Downloads folder
cd ~/Downloads
unzip play-tailwind.zip -d play-tailwind
- Open the landing page in a browser.
# Change to the project folder
cd play-tailwind
# Open the main page (adjust the command for your OS)
open index.html # macOS
xdg-open index.html # Linux
start index.html # Windows
- Optional – run the Tailwind development watcher (only needed if you want to modify Tailwind source).
npm install # install dev dependencies
npm run dev # watches src/input.css and outputs src/css/tailwind.css
The watcher writes the compiled CSS to src/css/tailwind.css. The HTML files already reference this file, so any changes are reflected when you refresh the browser.
Configuration
The template does not require any configuration to run. If you edit Tailwind styles, the only file that is processed is src/input.css. The compiled result is stored in src/css/tailwind.css. No additional build step is required for the static pages.
Customizing the project
- Change colors or spacing: edit
src/input.cssand use Tailwind utility classes. - Add or modify pages: copy an existing
.htmlfile, rename it, and update the navigation links in the header. - Swap images: replace files in
assets/images/with your own assets, keeping the same filenames or updating the<img>srcattributes. - Adjust scripts: the main JavaScript file is
assets/js/main.js. You can add custom code there or replace it with your own script.
Project structure
404.html
about.html
blog-details.html
blog-grids.html
contact.html
index.html
pricing.html
signin.html
signup.html
assets/
css/
animate.css
swiper-bundle.min.css
images/
… (23 image files)
js/
main.js
swiper-bundle.min.js
wow.min.js
src/
css/
tailwind.css
input.css
package.json
README.md
LICENSE
Tips
- Open any HTML file directly in the browser to test a specific page (e.g.,
contact.html). - When editing Tailwind utilities, run
npm run devin a separate terminal so the CSS file updates automatically. - Use the dark‑mode toggle in the UI to verify that both light and dark themes render correctly.
License and attribution
Play is released under the MIT License. See the full license file at the repository: https://github.com/tailgrids/play-tailwind/blob/main/LICENSE. When redistributing the template, keep the LICENSE file and retain the original copyright notice. Credit the author (TailGrids) as required by the 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 Play ## Your task You are a senior frontend engineer. We are building a new project using Play, a landing page built with Tailwind CSS 4, 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 plain static files, or name one: Vite / Laravel / Next.js / Astro] - Brand: [name, colours, fonts, logo] # Play — project brief ## Source project Play is a free Tailwind CSS landing‑page template built with Tailwind CSS v4. It provides multiple static pages (home, about, pricing, blog, contact, sign‑in/up, 404) with dark‑mode support and responsive design. Repository: https://github.com/tailgrids/play-tailwind – MIT license (see LICENSE, author TailGrids). ## Files that matter - **Entry page:** `index.html` (loads the main navigation, hero, sections, and scripts). - **Other pages:** `about.html`, `blog-details.html`, `blog-grids.html`, `contact.html`, `pricing.html`, `signin.html`, `signup.html`, `404.html`. - **Stylesheets:** - `assets/css/animate.css` – animation library. - `assets/css/swiper-bundle.min.css` – Swiper slider styles. - `src/css/tailwind.css` – compiled Tailwind output (generated from `src/input.css`). - **JavaScript:** - `assets/js/main.js` – custom site scripts (theme toggle, navbar, etc.). - `assets/js/swiper-bundle.min.js` – Swiper slider. - `assets/js/wow.min.js` – WOW.js scroll animations. - **Images & fonts:** All assets under `assets/images/` (logo, hero, team, testimonials, etc.). - **Tailwind source:** `src/input.css` (imports Tailwind directives). - **Configuration:** No separate config files; Tailwind is invoked via the CLI command in `package.json`. ## Setup and build Play consists of static HTML files; a build step is only needed to generate the Tailwind CSS file. Use the npm scripts defined in `package.json`. ```bash # Install dependencies npm install # Generate Tailwind CSS and watch for changes (development) npm run dev ``` The `dev` script runs `npx @tailwindcss/cli -i ./src/input.css -o ./src/css/tailwind.css --watch`, producing `src/css/tailwind.css`. No separate production build script is defined. After the CSS file exists, you can open any HTML file directly in a browser or serve the folder with a static server (e.g., `npx serve .`). ## How it is put together The template follows a single‑page navigation layout duplicated across all HTML files. Each page includes the same header/navbar, footer, and shared component sections (hero, features, pricing table, blog grid, contact form). - **Layout:** The navbar is positioned absolutely at the top and becomes fixed on scroll. Content sections are wrapped in `<section>` elements with Tailwind utility classes. - **Repeated elements:** Header (`<nav>`), footer, and the dark‑mode toggle script are present on every page. - **Libraries:** - **Tailwind CSS v4** – provides utility classes for layout, colors, spacing, and dark mode (`dark:` prefix). - **Swiper** – used for the hero/clients slider; initialized in `main.js`. - **WOW.js** + **animate.css** – enable scroll‑triggered animations; WOW is instantiated in `main.js`. - **JavaScript initialization:** `main.js` sets up the mobile navbar toggler, Swiper instance, WOW animation, and the dark‑mode toggle that adds/removes the `dark` class on `<html>`. - **Theme values:** Colors, fonts, and spacing are defined by Tailwind’s default config (no custom `tailwind.config.js` in the repo). Dark mode is handled by Tailwind’s built‑in `media` strategy (class‑based). No RTL support is included. ## Watch out for 1. **Tailwind version mismatch:** The project uses Tailwind v4; utility classes differ from v3 (e.g., `bg-primary` may not exist). Ensure any custom classes follow v4 syntax. 2. **Global CSS side effects:** `animate.css` and `swiper-bundle.min.css` apply global styles that can affect other elements; avoid overriding Tailwind utilities with conflicting selectors. 3. **CDN‑less assets:** All CSS and JS are loaded locally from `assets/`; moving files without updating paths will break the page. 4. **DOM‑specific scripts:** `main.js` expects elements with IDs like `navbarToggler` and `navbarCollapse`. Removing or renaming these IDs will cause the navbar toggle to stop working. 5. **Duplicate Tailwind output:** Running `npm run dev` multiple times without cleaning may produce stale `tailwind.css`. Delete `src/css/tailwind.css` before re‑generating if you change `src/input.css`. 6. **Dark‑mode toggle storage:** The script stores the mode in `localStorage`; clearing storage will reset the theme to default (light). ## Verify - [ ] All HTML pages load without 404 errors and display their respective content sections. - [ ] `src/css/tailwind.css` is generated and linked correctly in each page (``). - [ ] Navbar toggler works on mobile (clicking the button shows/hides the menu). - [ ] Swiper slider initializes and cycles through slides on pages that include it. - [ ] WOW.js animations trigger when scrolling into view, with no console errors. - [ ] Dark‑mode toggle switches the site theme and persists across page reloads. - [ ] Responsive layout adapts at Tailwind breakpoints (mobile, tablet, desktop). - [ ] No duplicate script or stylesheet tags are present in the `<head>` of any page. # How to work ## Step 1 — Get it running as it is Start from the downloaded ZIP or a clone of the repository. Serve the files locally as described in "Setup and build" above and open the entry page. Confirm it runs without console errors before changing anything. ## Step 2 — Plan the project with me List the pages and sections of Play 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 Play 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. - Keep dark mode working on every page you touch. ## 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. - Tell me which files to upload to the host. - Keep the license file and credit the author of Play. ## 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.



