21 lines | 920 Bytes

AGENTS.md — shadcn/ui

Setup

  • components.json at the root defines style, rsc, baseColor, cssVariables, and aliases (@/components, @/lib/utils).
  • Components are copied into components/ui via npx shadcn@latest add <name> — they are your code.

Conventions

  • Merge classes with cn() (clsx + tailwind-merge); use cva for variants exposed through props.
  • Build on Radix primitives; keep "use client" on interactive components; icons from lucide-react.
  • Style with semantic tokens (bg-background, text-foreground, …) backed by CSS variables.
  • Forward className + ...props so components stay composable.

Banned

  • Wrapping or npm-packaging the generated components/ui instead of editing them.
  • Manual class-string concatenation instead of cn().
  • Hardcoded raw colors that bypass theme tokens.
  • Reimplementing Radix behavior by hand or stripping "use client".