Create project
Start by creating a new Next.js project using create-next-app:
pnpm dlx create-next-app@latest my-app --typescript --tailwind --eslint
Run the CLI
Run the cult-ui init command to setup your project:
pnpm dlx cult-ui@latest init
Add motion
Install motion for animation-powered components:
pnpm add motion
Configure components.json
You will be asked a few questions to configure components.json:
Which style would you like to use? › Default
Which color would you like to use as base color? › Slate
Do you want to use CSS variables for colors? › no / yesFonts (Tailwind v4)
I use Inter as the default font. Inter is not required. You can replace it with any other font.
Here's how I configure Inter for Next.js:
1. Import the font in the root layout:
import "@/styles/globals.css"
import { Inter as FontSans } from "next/font/google"
import { cn } from "@/lib/utils"
const fontSans = FontSans({
subsets: ["latin"],
variable: "--font-inter",
})
export default function RootLayout({ children }: RootLayoutProps) {
return (
<html lang="en" suppressHydrationWarning>
<head />
<body
className={cn(
"min-h-screen bg-background font-sans antialiased",
fontSans.variable
)}
>
...
</body>
</html>
)
}2. Map your font variable in globals.css
@import "tailwindcss";
@theme inline {
--font-sans: var(--font-inter);
}App structure
Here's how I structure my Next.js apps. You can use this as a reference:
.
├── app
│ ├── layout.tsx
│ └── page.tsx
├── components
│ ├── ui
│ │ ├── alert-dialog.tsx
│ │ ├── button.tsx
│ │ ├── dropdown-menu.tsx
│ │ └── ...
│ ├── main-nav.tsx
│ ├── page-header.tsx
│ └── ...
├── lib
│ └── utils.ts
├── styles
│ └── globals.css
├── next.config.js
├── package.json
├── postcss.config.mjs
└── tsconfig.json- I place the UI components in the
components/uifolder. - The rest of the components such as
<PageHeader />and<MainNav />are placed in thecomponentsfolder. - The
libfolder contains all the utility functions. I have autils.tswhere I define thecnhelper. - The
stylesfolder contains the global CSS.
That's it
You can now start adding components to your project.
pnpm dlx cult-ui@latest add button
The command above will add the Button component to your project. You can then import it like this:
import { Button } from "@/components/ui/button"
export default function Home() {
return (
<div>
<Button>Click me</Button>
</div>
)
}AI SDK Agents
100+ AI Patterns
Real world AI SDK v6 patterns. Copy and paste.
Complex AI Agents
Workflow Patterns
Tools + Artifacts
Browse Patterns