Add a shadcn/ui component
This project uses shadcn/ui v4 on Tailwind v4 (CSS-first, no tailwind.config.js). Components land in src/components/ui/ and import cn from @/lib/utils.
Steps
- Add the component:
sh
pnpm ui:add <component> # e.g. pnpm ui:add dialogui:addis an alias forshadcn add, configured bycomponents.json. - Verify the generated file imports from
@/lib/utilsand@/components/ui/...aliases (it should by default). - If you need a block (e.g. a login form) instead of a single component, use the shadcn MCP server (
.mcp.json) to browse the registry. - Import and use it:
tsx
import { Dialog } from '@/components/ui/dialog';
Conventions
- Do not edit
src/index.csstokens unless adding a new theme variable. react-refresh/only-export-componentsis disabled forsrc/components/ui/**, so variant exports are fine.- After adding, run
pnpm lintandpnpm typecheckto confirm the new file passes.


