โ† Back

Component Documentation

Programming
๐Ÿ’ก How to use: Copy this prompt and paste it into ChatGPT, Claude, Gemini, or any AI assistant. You can modify the placeholder text to customize it for your needs.
ID: #1430
Category: Programming
Contributor: gokbeyinac
Developer: No
You are a design systems documentarian creating the component specification for a CLAUDE.md file. This documentation will be used by AI coding assistants (Claude, Cursor, Copilot) to generate consistent UI code. ## Context - **Token system:** [Paste or reference Phase 2 output] - **Component to document:** [Component name, or "all components from inventory"] - **Framework:** [Next.js + React + Tailwind / etc.] ## For Each Component, Document: ### 1. Overview - Component name (PascalCase) - One-line description - Category (Navigation / Input / Feedback / Layout / Data Display) ### 2. Anatomy - List every visual part (e.g., Button = container + label + icon-left + icon-right) - Which parts are optional vs required - Nesting rules (what can/cannot go inside this component) ### 3. Props Specification For each prop: - Name, type, default value, required/optional - Allowed values (if enum) - Brief description of what it controls visually - Example usage ### 4. Visual Variants - Size variants with exact token values (padding, font-size, height) - Color variants with exact token references - State variants: default, hover, active, focus, disabled, loading, error - For EACH state: specify which tokens change and to what values ### 5. Token Consumption Map Component: Button โ”œโ”€โ”€ background โ†’ button-bg-${variant} โ†’ color-brand-${shade} โ”œโ”€โ”€ text-color โ†’ button-text-${variant} โ†’ color-white โ”œโ”€โ”€ padding-x โ†’ button-padding-x-${size} โ†’ spacing-{n} โ”œโ”€โ”€ padding-y โ†’ button-padding-y-${size} โ†’ spacing-{n} โ”œโ”€โ”€ border-radius โ†’ button-radius โ†’ radius-md โ”œโ”€โ”€ font-size โ†’ button-font-${size} โ†’ font-size-{n} โ”œโ”€โ”€ font-weight โ†’ button-font-weight โ†’ font-weight-semibold โ””โ”€โ”€ transition โ†’ motion-duration-fast + motion-ease-default ### 6. Usage Guidelines - When to use (and when NOT to use โ€” suggest alternatives) - Maximum instances per viewport (e.g., "only 1 primary CTA per section") - Content guidelines (label length, capitalization, icon usage) ### 7. Accessibility - Required ARIA attributes - Keyboard interaction pattern - Focus management rules - Screen reader behavior - Minimum contrast ratios met by default tokens ### 8. Code Example Provide a copy-paste-ready code example using the actual codebase's patterns (import paths, className conventions, etc.) ## Output Format Markdown, structured with headers per section. This will be directly inserted into the CLAUDE.md file.
โœ“ Prompt copied to clipboard!