Caprice LogoCaprice UI
Installation

Next.js

Install and configure Caprice UI for Next.js.

Create project

Run the init command to create a new Next.js project or to setup an existing one:

npx shadcn@latest init https://caprice-ui.com/r/init.json

Run the init command to create a new Next.js project or to setup an existing one:

npx shadcn@latest init https://caprice-ui.com/r/init.json

Choose between a Next.js project or a Monorepo.

Add Caprice UI Registry to your components.json

components.json
{
  "registries": {
    "@caprice": "https://caprice-ui.com/r/{name}.json"
  }
}

Add Components

You can now start adding components to your project.

npx shadcn@latest add @caprice/button

The command above will add the Button component to your project. You can then import it like this:

app/page.tsx
import { Button } from "@/components/caprice-ui/button"

export default function Home() {
  return (
    <div>
      <Button>Click me</Button>
    </div>
  )
}

Alternatively, you can add all components at once with the following command:

npx shadcn@latest add @caprice/ui

This will add all caprice ui components to your project.