Caprice LogoCaprice UI
Installation

Laravel

Install and configure Caprice UI for Laravel.

Create project

Start by creating a new Laravel project with Inertia and React using the laravel installer laravel new my-app:

laravel new my-app --react

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/switch

The command above will add the Switch component to resources/js/components/caprice-ui/switch.tsx. You can then import it like this:

resources/js/pages/index.tsx
import { Switch } from "@/components/caprice-ui/switch"

const MyPage = () => {
  return (
    <div>
      <Switch />
    </div>
  )
}

export default MyPage

Add all components at once

You can install all Caprice UI components at once with a single command:

npx shadcn@latest add @caprice/ui

The command above will add all caprice ui components to your project.