What is DESIGN.md for Cursor?
DESIGN.md is a Markdown file that gives Cursor a written visual contract before it edits React, Tailwind, or shadcn code. It covers colors, typography, spacing, component rules, page patterns, and anti-patterns — giving Cursor stable design context instead of letting it make visual decisions from generic training data.
How do I set up DESIGN.md with Cursor?
Place DESIGN.md in your repo root alongside CLAUDE.md or .cursorrules. Reference it in prompts: "Read DESIGN.md for visual rules before editing UI." You can also add a pointer in .cursorrules so Cursor reads it automatically for all UI tasks without an explicit reminder.
What should I put in DESIGN.md for a Cursor project?
Include brand mood, color tokens mapped to Tailwind classes or CSS variables, typography scale, spacing rhythm with exact pixel values, component variants for buttons and cards, page layout patterns, accessibility rules, and anti-patterns. Use concrete values instead of adjectives — "card padding is 20px" rather than "clean and modern."
Does DESIGN.md work with shadcn/ui and Tailwind in Cursor?
Yes. shadcn and Tailwind projects benefit most from DESIGN.md because those tools provide primitives but not product taste. Map your tokens and component choices to Tailwind classes and shadcn variants in DESIGN.md, and Cursor can apply them consistently across every new component.