Create a components directory and create lib/utils.ts
src/components/lib/utils.ts
Copy
// src/components/lib/utils.tsimport { clsx, type ClassValue } from "clsx"import { twMerge } from "tailwind-merge"export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs))}
3
Copy the component you want to use.Follow the steps in the “Manual” tab on the shadcn/ui components page.For example, for Button:
Install additional packages
Shell
Copy
npm install @radix-ui/react-slot
Copy the component.
Be sure to change the import paths of lib/util and other components to relative paths.
The current version (v0.1.x) does not support custom color schemes (such as bg-primary, text-primary-foreground) set up with shadcn/ui.Therefore, you need to manually change the parts of the component’s style that relate to the custom color scheme. For example: bg-primary -> bg-zinc-900This issue will be resolved in an upcoming update!