Docs
Add utilities
Set up shadcn: components.json, theme variables and the cn helper every component uses.
Recommended: shadcn init
Step 1: Run shadcn init in your project
npx shadcn@latest initIt asks a few questions and then:
- creates
components.json, which tells the CLI where to put files (your aliases); - adds theme variables such as
--background,--cardand--muted-foregroundto your global CSS. VenusUI components use these, so they match your theme; - adds a
cnhelper at@/lib/utilsthat merges class names.
- creates
Step 2: Pick Radix or Base UI
Both work. VenusUI is tested against fresh apps with each. Blocks that need a shadcn primitive, such as
button, get the version that matches your choice.
Manual setup
If you can’t run init, add the cn helper yourself. You also need the shadcn theme variables in your CSS, or colors such as bg-card won’t exist.
npm install clsx tailwind-mergelib/utils.ts
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}