Build

UI components

The shadcn primitives in components/ui, the shared helpers on top of them, and how to theme them.

01Primitives

components/ui holds shadcn/ui components built on Radix, styled with Tailwind and lucide icons. The code is yours: edit a file and every screen that uses it changes.

ComponentUse it for
buttonActions. Variants: default, outline, secondary, ghost, destructive, link
input, textarea, select, switch, labelForm fields; every field gets a label
formreact-hook-form wiring with field errors
card, table, tabs, accordion, separatorLayout and data
dialog, sheet, dropdown-menuOverlays and menus
alert, badge, avatar, skeletonStatus, labels and loading states
sonnerToasts: toast.success() and toast.error() from "sonner"

02Button sizes

TypeScript
import { Button } from "@/components/ui/button";

<Button>Save</Button>
<Button variant="outline" size="sm">Cancel</Button>
<Button variant="destructive">Delete workspace</Button>
<Button size="icon" aria-label="Settings"><Settings /></Button>

Sizes: xs, sm, default, lg, xl (marketing calls to action) and icon, icon-xs, icon-sm, icon-lg.

03Shared helpers

ComponentWhat it does
ConfirmDialogControlled confirmation for destructive actions (open, onOpenChange, title, onConfirm)
RenameDialogRename a record in place
StatusPageFull-page states: 404, errors, empty results
ThemeToggle, LocaleSwitcherLight or dark, and language
BrandLinkLogo and name from config/brand.ts

04Theme

Colours and radius are CSS variables in app/globals.css, one set for light and one for dark. The brand values in config/brand.ts override them: colors.primary for buttons, links and focus rings, colors.accent for the logo mark and emails, theme.radius for corners and theme.mode for the default scheme.

Use tokens (bg-primary, text-muted-foreground, border-border), not hex values, so both themes keep working.

05Add a component

Terminal
npx shadcn@latest add progress

components.json points the CLI at components/ui and the project's Tailwind setup. Check a new component in both themes before using it.