A powerful, production-ready starter template for building static websites and web applications with Next.js 15, Tailwind CSS 4, and HeroUI.
This template is designed to give you a modern foundation with essential tools pre-configured, while remaining lightweight and easy to customize. It is perfect for landing pages, blogs, portfolios, and dashboards that don't require complex backend integration out of the box.
- Features
- Project Structure & Examples
- Getting Started
- Cleanup Guide
- Adding Components
- Scripts
- License
- Next.js 15 (App Router): The latest features from Next.js for server-side rendering and static generation.
- Tailwind CSS 4: The newest version of the utility-first CSS framework.
- HeroUI: A beautiful, accessible component library based on React Aria.
- Shadcn/ui Integration: Includes setup for using Shadcn components (example Drawer included).
- Dark Mode Support: Built-in light/dark mode switching with
next-themes. - Framer Motion: For complex animations and gestures.
- TypeScript: Fully typed for better developer experience.
- Turbopack: Fast local development.
The project is structured to help you get started quickly. Here are the key files and examples included:
src/app/page.tsx: The main landing page. [EXAMPLE] functionality included:- Theme switching dropdown.
- Counter state example.
- Drawer component usage.
src/app/layout.tsx: Root layout containing theProviderswrapper.src/providers/initial.tsx: Wraps your app with HeroUI, Theme, and other context providers.
src/components/ui/drawer.tsx: An example of a Shadcn/ui component manually added to the project. You can edit this file to customize the drawer or remove it if unused.
Clone the repository and install dependencies:
git clone <your-repo-url>
cd nextjs-template-static
npm installnpm run devOpen http://localhost:3000 to see the app.
This template comes with example code to show off the features (Theme toggle, Drawer, State). You probably want to start fresh for your own project.
We've included a script to automatically reset the project to a clean "Hello World" state.
Run the cleanup command:
npm run cleanupThis will:
- Replace
src/app/page.tsxwith a minimal, clean starter page. - Keep all configuration and UI libraries intact (HeroUI, Tailwind, etc.).
- Note: It does not delete
src/components/ui/drawer.tsxin case you want to keep the Shadcn setup, but you can manually delete it if unneeded.
If you prefer to do it manually:
- Open
src/app/page.tsx. - Delete everything inside the
Homecomponent. - Remove unused imports (Drawer, Framer Motion examples, etc.).
- Delete
src/components/ui/drawer.tsxif you don't plan to use it.
Import components directly from @heroui/react:
import { Button } from "@heroui/react";
<Button color="primary">Click Me</Button>This template is configured for Shadcn. To add new components:
- Go to ui.shadcn.com.
- Copy the component code.
- Create a new file in
src/components/ui/. - Import it into your app.
| Script | Description |
| path | to |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run cleanup |
Reset project to clean slate |
This project is open source and available under the MIT License.