A modern, feature-rich starter template for Next.js projects using the App Router with TypeScript, Tailwind CSS, and a curated collection of UI libraries. Perfect for building static websites and web applications without database dependencies.
- Next.js 15 with App Router and TypeScript
- Tailwind CSS 4 for modern styling
- HeroUI component library with dark/light theme support
- Shadcn/ui drawer component integration
- Lucide React icons
- Framer Motion for smooth animations
- Theme switching with next-themes
- ESLint configuration for code quality
- Turbopack for faster development builds
src/
├── app/
│ ├── globals.css # Global styles and Tailwind imports
│ ├── layout.tsx # Root layout with providers
│ └── page.tsx # Home page component
├── components/
│ └── ui/
│ └── drawer.tsx # Shadcn/ui drawer component
├── lib/
│ └── utils.ts # Utility functions (cn helper)
└── providers/
└── initial.tsx # App providers (Theme, HeroUI, Toast)
- Next.js 15 - React framework with App Router
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS 4 - Utility-first CSS framework
- HeroUI - Modern React component library
- Shadcn/ui - Re-usable components (drawer component included)
- Lucide React - Beautiful & consistent icon toolkit
- Framer Motion - Animation library (auto-installed by HeroUI)
- next-themes - Theme switching support
- Vaul - Drawer component primitive
- class-variance-authority - Component variant utility
- clsx - Conditional className utility
- tailwind-merge - Tailwind class merging
- Node.js 18+
- npm, yarn, or pnpm
-
Clone or download this template
-
Install dependencies
npm install # or yarn install # or pnpm install
-
Start the development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser Navigate to http://localhost:3000
npm run dev
- Start development server with Turbopacknpm run build
- Build the application for productionnpm run start
- Start the production servernpm run lint
- Run ESLint for code quality checks
HeroUI is the primary component library. It includes:
- Pre-built components (Button, Card, Input, etc.)
- Built-in dark/light theme support
- Automatic Framer Motion integration
- Toast notifications
import { Button, Card } from "@heroui/react";
export default function Example() {
return (
<Card>
<Button color="primary" variant="solid">
Click me
</Button>
</Card>
);
}
This template includes the drawer component from Shadcn/ui. You can add more components as needed:
import { Drawer, DrawerTrigger, DrawerContent } from "@/components/ui/drawer";
import { ArrowRight, Home, Settings } from "lucide-react";
export default function IconExample() {
return (
<div>
<Home size={24} />
<ArrowRight className="ml-2" />
</div>
);
}
The template includes complete dark/light theme support:
- System theme detection - Automatically matches user's system preference
- Manual theme switching - Programmatic theme control
- HeroUI integration - All components support theming
- Tailwind dark mode - Dark variant classes available
import { useTheme } from "next-themes";
export default function ThemeToggle() {
const { theme, setTheme } = useTheme();
return (
<button onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}>
Toggle Theme
</button>
);
}
Framer Motion is automatically installed as a dependency of HeroUI, but you can also use it directly for custom animations:
import { motion } from "framer-motion";
export default function AnimatedComponent() {
return (
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
>
Animated content
</motion.div>
);
}
Note: Framer Motion is included as a dependency of HeroUI, so you don't need to install it separately unless you want to ensure you have the latest version for custom animations.
-
For Shadcn/ui components:
- Visit ui.shadcn.com
- Copy the component code to
src/components/ui/
- Update imports as needed
-
For HeroUI components:
- All components are available from
@heroui/react
- Check HeroUI documentation for usage
- All components are available from
- Global styles: Edit
src/app/globals.css
- Component styles: Use Tailwind classes or CSS modules
- Theme customization: Modify the theme configuration in providers
The cn
utility function in src/lib/utils.ts
combines clsx
and tailwind-merge
for conditional class names:
import { cn } from "@/lib/utils";
export default function Component({ className, isActive }) {
return (
<div className={cn(
"base-classes",
isActive && "active-classes",
className
)}>
Content
</div>
);
}
@heroui/react
- Component library with theming@radix-ui/react-dialog
- Accessible dialog primitivesnext
- React frameworkreact
&react-dom
- React libraryframer-motion
- Animation library (HeroUI dependency)next-themes
- Theme switchinglucide-react
- Icon librarytailwind-merge
- Tailwind class mergingclsx
- Conditional classesclass-variance-authority
- Component variantsvaul
- Drawer component primitive
typescript
- Type checkingtailwindcss
- CSS frameworkeslint
&eslint-config-next
- Code linting@types/*
- TypeScript definitions
This is a starter template. Feel free to:
- Fork and customize for your needs
- Add new components and features
- Share improvements with the community
This project is open source and available under the MIT License.
- Next.js Documentation
- HeroUI Documentation
- Tailwind CSS Documentation
- Shadcn/ui Documentation
- Lucide Icons
- Framer Motion Documentation