Installing the srb/ui components is simple with the shadcn/ui CLI. You can add any component from our library to your Next.js project using the following command:
npx shadcn@latest add https://ui.srb.codes/r/<component>.json
Prerequisites
Before installing srb/ui, ensure your environment meets these requirements:
- Node.js version 18 or later
- A Next.js project
- shadcn/ui setup in your project. If you don't have it setup, running any install command will set it up for you.
Installing Components
You can install srb/ui components using the shadcn/ui CLI which adds the selected component’s code and any needed dependencies to your project.
The CLI will download the component's code and integrate it into your project's directory (usually under your components folder).
After running the command, you should see a confirmation in your terminal that the files were added. You can then proceed to use the component in your code.