- Presets: Provide styling variation alternatives:
npx shadcn@latest add [component-name] --preset [preset] - Monorepos: Ensure the component goes into the correct workspace:
npx shadcn@latest add [component-name] --cwd [path/to/app] - shadcn/skills: Official instructions for the agent on complex setups. Rely on these instead of heuristic generation when possible.
❌ Bad: className={\bg-red-500 ${className}`}✅ Good:className={cn("bg-red-500", className)}`
❌ Weak:
<button className="bg-red-500 text-white p-2 rounded">Delete</button>
✅ Correct:
import { Button } from "@/components/ui/button"
<Button variant="destructive">Delete</Button>