This is a boilerplate project for Next.js with Tailwind CSS and shadcn/ui integration.
- Next.js - React framework for building server-side rendered and static websites
- TypeScript - Typed superset of JavaScript
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Re-usable components built with Radix UI and Tailwind CSS
- Node.js 14.6.0 or newer
- pnpm (recommended) or npm
- Clone the repository:
git clone https://github.com/yourusername/nextjs-tailwind-shadcn-boilerplate.git
cd nextjs-tailwind-shadcn-boilerplate
- Install the dependencies:
pnpm install
To start the development server:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
To build the application for production:
pnpm build
To start the production server:
pnpm start
nextjs-tailwind-shadcn-boilerplate/
├── src/
│ ├── components/
│ ├── pages/
│ │ ├── _app.tsx
│ │ └── index.tsx
│ └── styles/
│ └── globals.css
├── public/
├── next.config.js
├── package.json
├── postcss.config.js
├── README.md
├── tailwind.config.js
└── tsconfig.json
To add shadcn/ui components, use the shadcn/ui CLI:
pnpm dlx shadcn-ui@latest add button
Replace button
with the name of the component you want to add.
- Modify
tailwind.config.js
to customize your design tokens and add new utility classes. - Update
src/styles/globals.css
to add your own custom styles. - Create new components in the
src/components/
directory. - Add new pages in the
src/pages/
directory.
To learn more about the technologies used in this boilerplate, take a look at the following resources:
This project is open source and available under the MIT License.