Installation

One command for a theme, one for each template

Before you start

You need a project set up with shadcn/ui on Base UI. In a new Next.js app that is one command; it writes components.json, app/globals.css and lib/utils.ts:

Terminal
npx shadcn@latest init -b base

A theme on its own works in any shadcn/ui project, Radix or Base UI, because it only sets CSS variables. The templates use Base UI's render props in their menus and sheets, so they want a Base UI project.

Install a theme

Pick one on the themes page and run its command. For Mono:

Terminal
npx shadcn@latest add https://dresscodeui.com/r/dresscode/mono.json

It adds:

  • Both modes' colors to app/globals.css: :root is light, .dark is dark. These are shadcn's own variables plus a few --dc-* ones for the templates.
  • The theme's fonts, loaded with next/font in app/layout.tsx (outside Next.js the CLI installs them from Fontsource).
  • The corner radius, and a few small classes the templates use.
  • lib/dresscode-theme.ts: which theme this is, its default mode, and the layout choices the templates read.

Every stock shadcn/ui component you have, and every one you add later, wears the theme from then on.

Light and dark

Every theme has both. The light colors apply by default; the dark ones apply under a .dark class on <html>, the shadcn convention. Harbor and Midnight were designed dark, so add the class for them.

app/layout.tsx
// app/layout.tsx: dark by default, or let next-themes switch it
<html lang="en" className="dark">

Follow the system, or a toggle

app/layout.tsx
// app/layout.tsx with next-themes (npm i next-themes)
import { ThemeProvider } from "next-themes"

<html lang="en" suppressHydrationWarning>
  <body>
    <ThemeProvider attribute="class" defaultTheme="system" enableSystem>
      {children}
    </ThemeProvider>
  </body>
</html>

Add a template

With a theme installed, add the landing page, the dashboard, or both:

Terminal
npx shadcn@latest add https://dresscodeui.com/r/dresscode/orbit-landing.json
npx shadcn@latest add https://dresscodeui.com/r/dresscode/orbit-app.json

The landing page lands in components/orbit with a page at /orbit; the dashboard in components/orbit-app with its screens at /orbit-app/<screen>. The CLI also adds the shadcn/ui components and npm packages they use. See Templates for what is inside.

Add components and blocks

Every example on Components and every section on Blocks is one command too, shown under its preview. A block is a single file in components/dresscode; import it into any page:

Terminal
npx shadcn@latest add https://dresscodeui.com/r/dresscode/hero-centered.json
npx shadcn@latest add https://dresscodeui.com/r/dresscode/pricing-tiers.json

Blocks use the theme's variables and the few dc-* classes it installs (the display face on headings, the colored band, cards), so they match the rest of the page. Pop's ink outlines on buttons need dc-brutal on a wrapper, as the templates do.

Switch themes

Run another theme's command and let it overwrite: the variables, the fonts and lib/dresscode-theme.ts change, and the components and templates follow without edits. Remove the old theme's font from app/layout.tsx if the new one uses a different family.

Short names

Full URLs work with no setup. To write @dresscode/sorbet instead, register the namespace once in your project:

Terminal
npx shadcn@latest registry add "@dresscode=https://dresscodeui.com/r/dresscode/{name}.json"
npx shadcn@latest add @dresscode/sorbet @dresscode/orbit-landing