Installation
In this section, you'll find the necessary setup requirements to use NX-UI components effectively.
1
Create project
Execute the init command to create a new Next.js project with shadcn or configure an existing one.
npx shadcn@latest init
2
Set up the components.json file
You'll be guided through a series of questions to configure components.json.
1Which style would you like to use? › New York
2Which color would you like to use as base color? › Zinc
3Do you want to use CSS variables for colors? › no / yes
3
All set!
You can now begin adding components to your project.
npx shadcn@latest button
This command will add the Button component to your project, allowing you to import it as follows:
import { Button } from "@/components/ui/button";
export default function Home() {
return (
<div>
<Button>Click me</Button>
</div>
);
}