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 @/*:
{
"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-reactFor the default base, also install Base UI:
pnpm add @base-ui/reactUtilities
Add lib/utils.ts with the cn helper:
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.
{
"$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 cardPrefer the CLI for adds even in a manual bootstrap - it resolves registry dependencies for you.
Next steps
Components
Browse the catalog and add what you need.
Theming
Restyle tokens after init.
CLI
Full reference for init, add, view, and build.
Prefer a different host? See all options on the Installation page.