Installation

Set up Apen UI in a React project that uses Tailwind CSS v4.

1. Create a project

Any React app with Tailwind CSS v4 works: Next.js, Vite or React Router. Starting from scratch? Use create-apen and pick Tailwind CSS when asked, or run npx create-next-app@latest.

2. Run init

init writes apen.json, adds the cn() helper to lib/utils.ts, puts the Apen theme tokens into your global CSS and installs clsx, tailwind-merge and tw-animate-css.

pnpm dlx apen-ui@latest init

3. Add components

Add only what you need. Dependencies between components are resolved for you.

pnpm dlx apen-ui@latest add button card sidebar

Want everything? Run npx apen-ui add --all.

4. Load the fonts

The theme uses Quicksand for headings and Plus Jakarta Sans for text. Load them with next/font and expose them as --font-quicksand and --font-jakarta. Without them the theme falls back to your system font.

app/layout.tsx
import { Plus_Jakarta_Sans, Quicksand } from "next/font/google"

const quicksand = Quicksand({ subsets: ["latin"], variable: "--font-quicksand" })
const jakarta = Plus_Jakarta_Sans({ subsets: ["latin"], variable: "--font-jakarta" })

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" className={`${quicksand.variable} ${jakarta.variable}`}>
      <body>{children}</body>
    </html>
  )
}

5. Use it

app/page.tsx
import { Button } from "@/components/ui/button"

export default function Page() {
  return <Button variant="brand">Get started</Button>
}