Back to prompts
Design23.03.2026
Create a Component Library Documentation
#design system#component library#documentation
Write documentation for a UI component library / design system: Product / company: [name] Component to document: [e.g. Button / Modal / Form Input / Data Table / Navigation] Tech stack: [e.g. React / Vue / HTML/CSS / Figma component] Audience: [developers using the library / designers / both] For each component, write complete documentation covering: 1. Overview: what this component is and when to use it (and when NOT to) 2. Props / variants: - Table of all props with type, default value, required/optional, description - Visual variants (e.g. primary / secondary / destructive / ghost) - Size variants - State variants (default / hover / active / disabled / loading / error) 3. Usage examples: code snippets for the 3 most common use cases 4. Accessibility requirements: ARIA roles, keyboard navigation, focus management, screen reader behaviour 5. Design guidelines: spacing, colour usage, icon placement, text length limits 6. Do's and don'ts: 3 of each with visual example descriptions 7. Related components: what to use instead in specific situations
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.
Tip
Fill every placeholder before you run the prompt. Keep one clear goal per run, then refine with a follow-up if needed.
When to use this prompt
- •Good for first drafts in Design
- •Keep variables filled so the model has enough context
- •Review AI output before sending or publishing