Captain UI

Getting started

Add the theme and your first component in about a minute.

Captain UI is a set of React components you copy into your project with the shadcn CLI. Every component is one file, uses Tailwind v4 and the motion library, and works with touch, mouse and keyboard.

1. Set up shadcn

Skip this if your project already has a components.json.

npx shadcn@latest init

2. Add a component

The first component you add also brings the theme (styles/captain.css), the shared helpers and the icons.

npx shadcn@latest add https://captain-ui.vercel.app/r/switch.json

3. Import the theme once

In your global CSS, after Tailwind:

@import "tailwindcss";
@import "../styles/captain.css";

4. Use it

import { Switch } from "@/components/ui/switch"

export function Settings() {
  return <Switch label="Ask before merging" />
}

Shorter installs

Add the @captain registry to components.json and every install becomes npx shadcn@latest add @captain/<name>. The header is only read for Pro components.

{
  "registries": {
    "@captain": {
      "url": "https://captain-ui.vercel.app/r/{name}.json",
      "headers": { "Authorization": "Bearer ${CAPTAIN_UI_LICENSE}" }
    }
  }
}

Or skip all of this and let your agent do it: see MCP.