This is a starter repository for integrating shadcn/ui with Next.js in an Nx monorepo.
Detailed instructions for configuring and setting up this repository can be found in a tutorial on Medium.com. Explore the tutorial for comprehensive insights into the repository's setup, ensuring a smooth and informed integration process.
- Shared library based on
shadcn/ui
components integrated in Next.js app - Monorepo structure using Nx for better organization and scalability
Make sure you have Node.js and npm installed on your machine.
-
Clone this repository:
git clone https://github.com/patrickvaler/nx-next-shadcn-ui-starter.git
-
Install npm dependencies
npm install
npm start
shadcn/ui
offers a cli to generate ui components.
Use the add
command to add components and dependencies to your project:
npx shadcn-ui@latest add [component]
You will be presented with a list of components to choose from:
Which components would you like to add? › Space to select. A to toggle all.
Enter to submit.
◯ accordion
◯ alert
◯ alert-dialog
◯ aspect-ratio
◯ avatar
◯ badge
◯ button
◯ calendar
◯ card
◯ checkbox
Check the shadcn/ui
cli docs for further information.