Manual

Wire Cubix by hand in any React 18+ host with Tailwind CSS v4.

No CLI bootstrap - paste utilities, tokens, and components yourself.

Path alias

Ensure TypeScript and your bundler resolve @/*:

tsconfig.json
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./*"]
    }
  }
}

Core dependencies

Install the packages every Cubix component expects. Tailwind CSS v4 should already be in the project.

pnpm add class-variance-authority clsx tailwind-merge lucide-react

For the default base, also install Base UI:

pnpm add @base-ui/react

Utilities

Add lib/utils.ts with the cn helper:

lib/utils.ts
import { clsx, type ClassValue } from "clsx"
import { extendTailwindMerge } from "tailwind-merge"

const twMerge = extendTailwindMerge({
  extend: {
    theme: {
      text: [
        "display",
        "headline",
        "title",
        "lead",
        "body",
        "caption",
        "label",
      ],
    },
  },
})

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

Design tokens

Copy Cubix tokens into your global CSS entry. See Theming for the full map, or run cubix-ui init in a scratch folder and copy the generated CSS.

cubix.json
{
  "$schema": "https://cubixflow.ir/schema.json",
  "style": "cubix",
  "base": "base",
  "rsc": true,
  "tsx": true,
  "tailwind": {
    "config": "",
    "css": "app/globals.css",
    "baseColor": "neutral",
    "cssVariables": true,
    "prefix": ""
  },
  "iconLibrary": "lucide",
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/cubix",
    "lib": "@/lib",
    "hooks": "@/hooks"
  }
}

Paste a component

Create components/cubix/button.tsx, paste source from the docs Manual tab or public/r/button.json, install listed dependencies, and fix import paths if needed.

pnpm dlx cubix-ui@latest add card

Prefer the CLI for adds even in a manual bootstrap - it resolves registry dependencies for you.

Next steps

Prefer a different host? See all options on the Installation page.