Ant Design cheatsheet
Version baseline: Ant Design 6.x (6.4.3 current stable at this review), with the current v6 documentation and React 18 or 19 compatibility; prefer React 19 for new work. Inspect the exact installed patch and migration notes before changing an existing project.
Use references/cheatsheet.md as the first lookup for common operations. Answer the user's specific question, not the whole reference: identify the component, show the smallest relevant import and snippet, name the state model, and call out one likely pitfall.
Answering questions
- Inspect
package.jsonwhen the question depends on an API, token, date library, or framework integration. Treat the installed version as authoritative. - Search the reference by use case or component name. If it does not cover the question, consult the project's existing usage and the official Ant Design documentation rather than inventing a prop.
- Prefer current
items, token, hook, and controlled-state patterns when supported by the installed version, while preserving older project conventions when changing code would be disruptive. - Explain whether state is local, controlled, form-owned, route-owned, or server-owned. Most Ant Design bugs are state-model mismatches rather than missing props.
- Include a version note when the answer differs across the installed version. Mention adjacent setup or troubleshooting work only when it is necessary to make the snippet function.
Useful response shape
Use: <component>
Import: <small import>
Pattern: <minimal example>
State: <where the source of truth lives>
Watch for: <one likely pitfall>
Keep a lookup answer short; offer a code change only when the user asks to implement it.