Manual Installation
Add dependencies to your project manually.
Add Tailwind CSS
Components are styled using Tailwind CSS. You need to install Tailwind CSS in your project.
npm
npm install class-variance-authority clsx tailwind-merge lucide-react tw-animate-css
Configure path aliases
Configure the path aliases in your tsconfig.json file.
jsontsconfig.json
{"compilerOptions": {"baseUrl": ".","paths": {"@/*": ["./*"]}}}
Add a cn helper
tslib/utils.ts
import { clsx, type ClassValue } from "clsx"import { twMerge } from "tailwind-merge"export function cn(...inputs: ClassValue[]) {return twMerge(clsx(inputs))}
Create a components.json file
Create a components.json file in the root of your project.
tsvite.config.ts
{"style": "new-york","rsc": false,"tsx": true,"tailwind": {"config": "","css": "src/styles/globals.css","baseColor": "neutral","cssVariables": true,"prefix": ""},"aliases": {"components": "@/components","utils": "@/lib/utils","ui": "@/components/ui","lib": "@/lib","hooks": "@/hooks"},"iconLibrary": "lucide"}