Installation
Set up a project once, then add components one at a time.
Requirements
React 19, Tailwind CSS v4, and TypeScript. Next.js, Vite, and React Router all work.
Set up shadcn
If your project doesn't have a components.json yet, initialize it:
npx shadcn@latest initIn a new Next.js app, check the font afterwards. shadcn init points --font-sans at a variable the Next.js starter doesn't define, so text falls back to a serif font. Name the font variable --font-sans in your root layout:
const geistSans = Geist({
variable: "--font-sans", // was "--font-geist-sans"
subsets: ["latin"],
});Add the Lode theme
Once per project, add the theme: chart colours, elevation shadows and the brand accent that Lode components use. Components bring it in automatically too, but only this command replaces colours your project already has, like shadcn's grey chart palette.
npx shadcn@latest add https://lodeui.com/r/lode-theme.jsonAdd a component
Each component has its own URL in the registry. The CLI installs its dependencies and any components it builds on.
pnpm dlx shadcn@latest add https://lodeui.com/r/button.jsonTo use short names, add the registry to components.json, then run npx shadcn@latest add @lode/button.
{
"registries": {
"@lode": "https://lodeui.com/r/{name}.json"
}
}Manual installation
Install the shared dependencies and add the cn helper:
npm install motion lucide-react clsx tailwind-mergeimport { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}Then copy a component's source from the Installation section of its page.
Lode·229 doc pages·llms.txt