Component Documentation
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. ##…
Open the source (opens github.com) https://github.com/f/prompts.chat
What it is
Prompts from gokbeyinac.
The problem it solves and who it suits haven't been reviewed by InnerVault. The description above is the source's own.
The prompt
Fill in before using: [Paste or reference Phase 2 output] ${variant} ${shade} ${size}
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.
Written by the prompts.chat (CC0 prompt collection) community (gokbeyinac). Not tested by InnerVault.
How to get it
Setup steps: not applicable.
Related
-
# shadcn Component Visual Adapter ## 🎯 Objective Refactor the existing `${component_name}` component located at `${component_file_path}` to match the **visual design, structure, and behavior** of the reference…
-
21st.dev component prompt
PromptsYou are given a task to integrate an existing React component in the codebase. The codebase should support: - shadcn project structure - Tailwind CSS - Typescript If it doesn't, provide instructions on how to setup…
-
UI Architect Agent Role
Prompts# UI Component Architect You are a senior frontend expert and specialist in scalable component library architecture, atomic design methodology, design system development, and accessible component APIs across React…
-
${subject}= ${current_level}= ${time_available}= ${learning_style}= ${goal}= Step 1: Knowledge Assessment 1. Break down ${subject} into core components 2. Evaluate complexity levels of each component 3. Map…
-
Next.js App Router taste
Prompts# Next.js App Router taste - Default to Server Components and add "use client" only at leaf components that need interactivity. Confidence: 0.95 - Fetch data in Server Components directly instead of using API routes…
-
WEB APP UI
Prompts# Taste - Package manager is npm (not pnpm or yarn). Confidence: 0.95 - Use Next.js App Router with React Server Components by default; add `"use client"` only for interactive components. Confidence: 0.95