# Installation

Install Kokonut UI components in any React or Next.js project with the shadcn CLI, using namespaces or direct registry URLs. No extra setup required.

Set up with your agent and follow [these instructions](/content/setup.md) to add the registry and write a rules file.

## Add the registry

Kokonut UI is a shadcn/ui registry. The shadcn CLI reads its configuration from `components.json`; if your project doesn't have one yet, create it:

**Package manager**: bunnpmpnpm

```bash
$bunx --bun shadcn@latest init
```

Then add the `@kokonutui` namespace to it, so components install by name:

**components.json**:

```json
{
  "registries": {
    "@kokonutui": "https://kokonutui.com/r/{name}.json"
  }
}
```

If you copy a component's source by hand, you can skip this step, but you'll have to install its dependencies yourself.

## Install the utilities

Components are styled with [Tailwind CSS v4](https://tailwindcss.com/docs/installation/framework-guides/nextjs), so make sure it's set up. Most of them also use the `cn` helper:

**Package manager**: bunnpmpnpm

```bash
$bunx --bun shadcn@latest add https://kokonutui.com/r/utils.json
```

## Add a component

Name the component. The CLI writes it to `components/kokonutui/` and installs necessary packages like [lucide-react](https://lucide.dev/guide/installation) icons and [shadcn/ui](https://ui.shadcn.com/) primitives:

**Package manager**: bunnpmpnpm

```bash
$bunx --bun shadcn@latest add @kokonutui/particle-button
```

Then use it like any component in your project:

**app/page.tsx**:

```javascript
import ParticleButton from "@/components/kokonutui/particle-button";

export default function Page() {
  return <ParticleButton />;
}
```

Each component page lists the packages it installs above its demo. Prefer the CLI over copying the source: it brings every file and dependency the component needs.

## Use an AI agent

Claude Code, Cursor, VS Code, and Codex can find and install components for you through the shadcn MCP server. See [Agents](/content/docs/agents/index.html) to connect your editor and add a rules file.

## Monorepos

In a monorepo, pass the workspace the component belongs to with `-c`:

**Package manager**: bunnpmpnpm

```bash
$bunx --bun shadcn@latest add @kokonutui/particle-button -c ./apps/www
```

### On this page

Links to detailed documentation: 
- [Add the registry](/content/docs#add-the-registry/index.html)  
- [Install the utilities](/content/docs#install-the-utilities/index.html)  
- [Add a component](/content/docs#add-a-component/index.html)  
- [Use an AI agent](/content/docs#use-an-ai-agent/index.html)  
- [Monorepos](/content/docs#monorepos/index.html)

### Image Example

Dither Reveal Hero:  
- 150+ components and templates for AI products  
- Works with Claude Code, Cursor, and more  
- One command installation with shadcn/cli

Explore [Kokonut UI Pro](https://kokonutui.pro/?utm_source=kokonutui.com&utm_medium=toc&utm_content=dither-reveal-hero) Trusted by 1k+ users worldwide.
