Design System Analyzer
Overview
This skill enables systematic analysis of UI screenshots and design images to extract and document design system elements. Extract colors, typography, spacing patterns, and component styles from any UI, then generate a comprehensive, interactive design system with design tokens and CSS snippets ready for implementation.
When to Use This Skill
Use this skill when:
- Analyzing UI screenshots to understand the design system
- Reverse-engineering a design to create a style guide
- Documenting an existing UI's design patterns
- Converting visual designs into code-ready design tokens
- Creating a design system from mockups or screenshots
- Auditing UI consistency across different screens
Analysis Process
When analyzing a UI image, systematically examine and document the following elements in order:
1. Color Analysis
Identify and categorize all colors visible in the UI:
Primary Colors:
- Main brand colors used for primary actions and key elements
- Note hex codes, usage context, and prominence
Secondary Colors:
- Supporting colors for secondary actions and elements
- Document their relationship to primary colors
Accent Colors:
- Highlight colors for attention-grabbing elements
- Success, warning, error, and info states
Background Colors:
- Base backgrounds (light/dark themes)
- Card backgrounds
- Surface colors and overlays
Text Colors:
- Heading colors
- Body text colors
- Muted/secondary text colors
- Link colors and states (default, hover, visited)
Gradients (if needed)
Some design are heavy on gradients, document them if needed
For each color, provide:
- Hex code
- RGB values
- Usage context
- Semantic naming suggestion (e.g.,
--color-primary-500)
2. Typography Analysis
Examine all text elements and document:
Font Families:
- Identify fonts used (if recognizable)
- Suggest web-safe or similar alternatives if needed
Heading Styles (h1-h6):
- Font size (px, rem, or estimate)
- Font weight
- Line height
- Letter spacing
- Text color
- Margin/padding patterns
Body Text Styles:
- Default body font size and line height
- Paragraph spacing
- Text color and contrast ratios
Special Text Styles:
- Links
- Captions
- Labels
- Button text
- Code/monospace text
- Any other distinct text treatments
For each style, generate:
- CSS class definitions
- Design token recommendations
- Usage guidelines
3. Spacing Analysis
Analyze spatial relationships and document:
Spacing Scale:
- Identify the spacing unit (likely 4px or 8px base)
- Document the scale (e.g., 4, 8, 12, 16, 24, 32, 48, 64)
Padding Patterns:
- Component internal spacing
- Button padding
- Card padding
- Input field padding
Margin Patterns:
- Vertical rhythm between sections
- Spacing between components
- Layout margins
Grid System:
- Identify column structure if visible
- Gutter widths
- Container max-widths
- Responsive breakpoint hints
Provide spacing tokens like:
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
4. Component Analysis
Components are the building blocks of the UI. Systematically identify, analyze, and document each recurring UI pattern with comprehensive detail.
Component Identification Strategy
- Scan the entire UI for repeating visual patterns
- Group similar elements (all buttons together, all inputs together, etc.)
- Identify variants within each component type
- Document states for interactive elements
- Note composition patterns (how components combine)
Core Components to Analyze
Buttons:
For each button variant found:
Input Fields:
Analyze all form controls:
Text Inputs:
- Border style, color, and width
- Border radius
- Padding
- Font size and color
- Placeholder styling
- Background color
- Height/min-height
- Focus ring/outline style
- Error state styling (red border, icon, message)
- Success state (if present)
- Disabled state appearance
Textareas:
- Resizing behavior
- Min/max height
- Differences from text inputs
Select Dropdowns:
- Dropdown indicator icon
- Menu appearance
- Selected item styling
- Option hover states
- Search functionality (if present)
Checkboxes:
- Size and shape
- Border and fill colors
- Checkmark style
- Checked state appearance
- Indeterminate state (if present)
- Label positioning and spacing
Radio Buttons:
- Circle size
- Border and fill colors
- Selected state (inner dot)
- Label positioning
Toggles/Switches:
- Track width and height
- Handle/knob size and style
- On/off colors
- Animation/transition
Label patterns:
- Position (top, left, inline)
- Font size and weight
- Required field indicators (asterisk, "Required" text)
- Helper text styling
Cards:
Structure:
- Overall shape and dimensions
- Border or shadow for definition
- Background color
- Border radius
- Internal padding
- Content sections (header, body, footer)
Variants:
- Basic card
- Card with image/media
- Card with header
- Card with actions/buttons
- Interactive cards (clickable, hoverable)
- List/feed cards
Elevation:
- Default shadow
- Hover shadow (if interactive)
- Border treatment vs shadow
Internal spacing:
- Content padding
- Spacing between sections
- Spacing around images
Navigation Components:
Navigation Bar/Header:
- Height and padding
- Background color and transparency
- Border or shadow
- Logo size and positioning
- Navigation item spacing
- Mobile hamburger menu (if visible)
Navigation Items:
- Default text color and weight
- Hover state
- Active/current page indicator
- Underline, background, or other active indicators
- Dropdown indicators (if present)
Breadcrumbs:
- Separator style (/, >, icon)
- Text size and color
- Current item styling
- Link vs non-link items
Tabs:
- Tab button styling
- Active tab indicator (underline, background, border)
- Spacing between tabs
- Tab bar border/separator
Sidebar Navigation:
- Width
- Background color
- Item padding and spacing
- Active item styling
- Nested/collapsible sections
- Icons + text patterns
Modals/Dialogs:
Overlay/backdrop:
- Background color and opacity
- Blur effect (if any)
Modal container:
- Width (fixed or responsive)
- Background color
- Border radius
- Shadow
- Padding
- Positioning (centered, top-offset)
Header:
- Title styling
- Close button (X icon, position, size)
- Border separator
Body:
- Content spacing
- Scrolling behavior
Footer:
- Button alignment (right, center, space-between)
- Button spacing
- Border separator
Alerts/Notifications:
Types:
- Success (color, icon)
- Warning (color, icon)
- Error (color, icon)
- Info (color, icon)
Structure:
- Background color (solid or tinted)
- Border (left accent, full border)
- Border radius
- Padding
- Icon size and positioning
- Close/dismiss button
- Shadow or elevation
Variants:
- Inline alerts (within forms)
- Toast/snackbar notifications
- Banner notifications
Badges/Tags:
Appearance:
- Size (height, padding)
- Border radius (rounded corners or pills)
- Background color variants
- Text size and weight
- Text transform (uppercase, etc.)
Variants:
- Status badges (success, warning, error, info)
- Count badges (notification counters)
- Removable tags (with X icon)
- Outlined vs filled
Loading States:
Spinners:
- Size variants
- Color
- Animation speed and style
Skeleton screens:
- Shape and sizing
- Animation (pulse, shimmer)
- Color
Progress bars:
- Height
- Background and fill colors
- Border radius
- Indeterminate vs determinate
Tooltips:
- Background color
- Text color and size
- Padding
- Border radius
- Arrow/pointer style
- Shadow
- Max-width
- Positioning relative to trigger
Dropdowns/Menus:
- Container background and border
- Border radius
- Shadow
- Item padding
- Item hover state
- Divider style
- Icon spacing
- Max-height and scrolling
Other Components to Consider:
- Avatars (size variants, placeholder states)
- Dividers/separators
- Empty states
- Error pages
- Icons (size scale, style consistency)
- Images (border radius, aspect ratios)
- Lists (bullet/numbered styling, spacing)
- Pagination
- Search bars
- Tables (header styling, row hover, borders)
- Accordions/collapsible sections
- Steppers/progress indicators
- Date pickers
- File upload components
Component Documentation Template
For each component identified, provide:
Component Name & Description
- Brief explanation of purpose and usage
Visual Characteristics
- Detailed measurements and styling
- Color values with tokens
Variants
- List all variations discovered
- Visual differences between variants
States (for interactive components)
- Default, hover, active, focus, disabled, loading, error, success
Sizing Options
- Small, medium, large (if applicable)
- Responsive behavior
Composition Patterns
- How the component combines with others
- Common usage patterns
CSS Implementation
- Complete, copy-paste ready code
- Using design tokens
- Including all states and variants
Accessibility Notes
- ARIA attributes needed
- Keyboard navigation patterns
- Focus management
- Color contrast issues (if any)
Usage Guidelines
- When to use this component
- When NOT to use it
- Common patterns and anti-patterns
Output Format
Present the analysis as a comprehensive, interactive design system documentation using the following structure:
Structure
The output should follow this comprehensive structure, with heavy emphasis on the Components section:
# Design System Documentation
## 🎨 Design Tokens
### Colors
[Present complete color palette with visual swatches and tokens]
### Typography
[Present type scale with examples and CSS classes]
### Spacing
[Present spacing scale with usage examples]
### Shadows & Effects
[Document shadows, border radius, and other visual treatments]
---
## 📐 Components Library
This is the MOST IMPORTANT section. Document every component identified with comprehensive detail.
### Buttons
#### Overview
[Brief description of button usage in this design]
#### Variants
- **Primary Button**: [Description, usage, visual characteristics]
- **Secondary Button**: [Description, usage, visual characteristics]
- **Tertiary Button**: [Description, usage, visual characteristics]
- **Ghost/Text Button**: [Description, usage, visual characteristics]
- **Destructive Button**: [Description for dangerous actions]
#### Sizing
- Small: [Dimensions, padding, font size]
- Medium (Default): [Dimensions, padding, font size]
- Large: [Dimensions, padding, font size]
#### States
- Default
- Hover
- Active/Pressed
- Focus
- Disabled
- Loading
#### CSS Implementation
[Complete button styles with all variants, sizes, and states]
#### Usage Guidelines
[When to use each variant, best practices]
---
### Form Components
#### Text Input
[Complete documentation following component template]
#### Textarea
[Complete documentation]
#### Select/Dropdown
[Complete documentation]
#### Checkbox
[Complete documentation]
#### Radio Button
[Complete documentation]
#### Toggle/Switch
[Complete documentation if present]
---
### Cards
#### Overview
[Card usage and purpose]
#### Variants
- Basic Card
- Card with Header
- Card with Image
- Interactive Card
- [Other variants found]
#### Structure
- Header styling
- Body styling
- Footer styling
- Image/media treatment
#### CSS Implementation
[Complete card styles]
---
### Navigation
#### Navigation Bar
[Complete documentation]
#### Navigation Items
[Item styling, states, active indicators]
#### Breadcrumbs
[If present]
#### Tabs
[If present]
#### Sidebar Navigation
[If present]
---
### Modals & Overlays
#### Modal/Dialog
[Complete documentation including backdrop, structure, sizing]
#### Tooltip
[If present]
#### Dropdown Menu
[If present]
#### Popover
[If present]
---
### Feedback Components
#### Alerts
- Success Alert
- Warning Alert
- Error Alert
- Info Alert
[Complete documentation for each]
#### Toast/Snackbar Notifications
[If present]
#### Loading States
- Spinners
- Skeleton screens
- Progress bars
---
### Data Display
#### Tables
[If present - header, rows, borders, hover states]
#### Lists
[Styling for ordered/unordered lists]
#### Empty States
[If present]
---
### Other Components
[Document any additional components found:]
- Avatars
- Badges/Tags
- Dividers
- Pagination
- Search Bars
- Accordions
- Steppers
- Date Pickers
- [Etc.]
---
## 💻 Complete CSS Implementation
### Design Tokens (CSS Variables)
```css
:root {
/* Colors */
--color-primary-500: #...;
--color-secondary-500: #...;
/* Typography */
--font-family-sans: ...;
--font-size-base: ...;
/* Spacing */
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
/* Shadows */
--shadow-sm: ...;
--shadow-md: ...;
/* Border Radius */
--radius-sm: ...;
--radius-md: ...;
}
Component Styles
[Provide all component CSS in one place for easy copy-paste]
📱 Implementation Guidelines
Getting Started
[How to use this design system]
Best Practices
[General guidance]
Accessibility Notes
[Important accessibility considerations across components]
Responsive Considerations
[Any responsive patterns observed]
### Presentation Style
- Use clear headings and sections with emoji for visual hierarchy
- Include color swatches (use colored emoji or describe visually)
- Provide both design tokens and CSS snippets
- Make it actionable and implementation-ready
- Include usage examples where helpful
- Note any accessibility considerations (color contrast, focus states, etc.)
## Best Practices
**Be Thorough:**
- Examine every visible element in the image
- Look for subtle variations (hover states, shadows, borders)
- Identify patterns and inconsistencies
**Be Specific:**
- Provide exact or well-estimated measurements
- Use specific color values, not vague descriptions
- Document context for each element
**Be Actionable:**
- Generate implementation-ready CSS
- Suggest semantic naming conventions
- Provide design tokens that can be used immediately
**Consider Accessibility:**
- Check color contrast ratios where possible
- Note focus states and keyboard navigation cues
- Suggest ARIA labels or semantic HTML where relevant
**Organize Logically:**
- Start with foundations (colors, typography, spacing)
- Progress to components
- Conclude with implementation code
## Additional Notes
- If the image quality makes it difficult to determine exact values, provide best estimates and note uncertainty
- If multiple screens or states are visible, document variations
- Consider responsive design patterns if multiple viewport sizes are shown
- Look for design inconsistencies that should be standardized
1---2name: design-system-analyzer3description: Use when analyzing UI screenshots or designs to extract and document design system elements. Analyzes images to identify colors, typography, spacing, components, and patterns, then generates a structured design system with design tokens and CSS snippets. Ideal for reverse-engineering designs, creating style guides, or documenting existing UIs.4---5
6# Design System Analyzer
7
8## Overview
9
10This skill enables systematic analysis of UI screenshots and design images to extract and document design system elements. Extract colors, typography, spacing patterns, and component styles from any UI, then generate a comprehensive, interactive design system with design tokens and CSS snippets ready for implementation.
11
12## When to Use This Skill
13
14Use this skill when:
15- Analyzing UI screenshots to understand the design system
16- Reverse-engineering a design to create a style guide
17- Documenting an existing UI's design patterns
18- Converting visual designs into code-ready design tokens
19- Creating a design system from mockups or screenshots
20- Auditing UI consistency across different screens
21
22## Analysis Process
23
24When analyzing a UI image, systematically examine and document the following elements in order:
25
26### 1. Color Analysis
27
28Identify and categorize all colors visible in the UI:
29
30**Primary Colors:**
31- Main brand colors used for primary actions and key elements
32- Note hex codes, usage context, and prominence
33
34**Secondary Colors:**
35- Supporting colors for secondary actions and elements
36- Document their relationship to primary colors
37
38**Accent Colors:**
39- Highlight colors for attention-grabbing elements
40- Success, warning, error, and info states
41
42**Background Colors:**
43- Base backgrounds (light/dark themes)
44- Card backgrounds
45- Surface colors and overlays
46
47**Text Colors:**
48- Heading colors
49- Body text colors
50- Muted/secondary text colors
51- Link colors and states (default, hover, visited)
52
53**Gradients (if needed)**
54Some design are heavy on gradients, document them if needed
55
56For each color, provide:
57- Hex code
58- RGB values
59- Usage context
60- Semantic naming suggestion (e.g., `--color-primary-500`)
61
62### 2. Typography Analysis
63
64Examine all text elements and document:
65
66**Font Families:**
67- Identify fonts used (if recognizable)
68- Suggest web-safe or similar alternatives if needed
69
70**Heading Styles (h1-h6):**
71- Font size (px, rem, or estimate)
72- Font weight
73- Line height
74- Letter spacing
75- Text color
76- Margin/padding patterns
77
78**Body Text Styles:**
79- Default body font size and line height
80- Paragraph spacing
81- Text color and contrast ratios
82
83**Special Text Styles:**
84- Links
85- Captions
86- Labels
87- Button text
88- Code/monospace text
89- Any other distinct text treatments
90
91For each style, generate:
92- CSS class definitions
93- Design token recommendations
94- Usage guidelines
95
96### 3. Spacing Analysis
97
98Analyze spatial relationships and document:
99
100**Spacing Scale:**
101- Identify the spacing unit (likely 4px or 8px base)
102- Document the scale (e.g., 4, 8, 12, 16, 24, 32, 48, 64)
103
104**Padding Patterns:**
105- Component internal spacing
106- Button padding
107- Card padding
108- Input field padding
109
110**Margin Patterns:**
111- Vertical rhythm between sections
112- Spacing between components
113- Layout margins
114
115**Grid System:**
116- Identify column structure if visible
117- Gutter widths
118- Container max-widths
119- Responsive breakpoint hints
120
121Provide spacing tokens like:
122```css
123--spacing-xs: 4px;
124--spacing-sm: 8px;
125--spacing-md: 16px;
126--spacing-lg: 24px;
127--spacing-xl: 32px;
128```
129
130### 4. Component Analysis
131
132Components are the building blocks of the UI. Systematically identify, analyze, and document each recurring UI pattern with comprehensive detail.
133
134#### Component Identification Strategy
135
1361. **Scan the entire UI** for repeating visual patterns
1372. **Group similar elements** (all buttons together, all inputs together, etc.)
1383. **Identify variants** within each component type
1394. **Document states** for interactive elements
1405. **Note composition patterns** (how components combine)
141
142#### Core Components to Analyze
143
144**Buttons:**
145
146For each button variant found:
147- **Visual characteristics:**
148 - Background color (fill or transparent)
149 - Text color and font weight
150 - Border (width, color, style)
151 - Border radius
152 - Padding (horizontal and vertical)
153 - Icon presence and positioning
154 - Shadow effects
155 - Height/min-height
156
157- **Variants to identify:**
158 - Primary (main CTA)
159 - Secondary (less emphasis)
160 - Tertiary (minimal styling)
161 - Ghost/Text (no background)
162 - Destructive (delete/remove actions)
163 - Link-style buttons
164
165- **Sizes:**
166 - Small (compact interfaces, inline actions)
167 - Medium (default)
168 - Large (hero sections, prominent CTAs)
169 - Full-width variants
170
171- **States:** Document visual changes for:
172 - Default/Rest
173 - Hover (background, shadow, transform)
174 - Active/Pressed
175 - Focus (outline, ring, shadow)
176 - Disabled (opacity, cursor, colors)
177 - Loading (spinner, text changes)
178
179- **Icon combinations:**
180 - Icon-only buttons
181 - Icon + text (left/right positioning)
182 - Icon size relative to text
183
184- **CSS Implementation:** Provide complete styles including transitions
185
186**Input Fields:**
187
188Analyze all form controls:
189
190- **Text Inputs:**
191 - Border style, color, and width
192 - Border radius
193 - Padding
194 - Font size and color
195 - Placeholder styling
196 - Background color
197 - Height/min-height
198 - Focus ring/outline style
199 - Error state styling (red border, icon, message)
200 - Success state (if present)
201 - Disabled state appearance
202
203- **Textareas:**
204 - Resizing behavior
205 - Min/max height
206 - Differences from text inputs
207
208- **Select Dropdowns:**
209 - Dropdown indicator icon
210 - Menu appearance
211 - Selected item styling
212 - Option hover states
213 - Search functionality (if present)
214
215- **Checkboxes:**
216 - Size and shape
217 - Border and fill colors
218 - Checkmark style
219 - Checked state appearance
220 - Indeterminate state (if present)
221 - Label positioning and spacing
222
223- **Radio Buttons:**
224 - Circle size
225 - Border and fill colors
226 - Selected state (inner dot)
227 - Label positioning
228
229- **Toggles/Switches:**
230 - Track width and height
231 - Handle/knob size and style
232 - On/off colors
233 - Animation/transition
234
235- **Label patterns:**
236 - Position (top, left, inline)
237 - Font size and weight
238 - Required field indicators (asterisk, "Required" text)
239 - Helper text styling
240
241**Cards:**
242
243- **Structure:**
244 - Overall shape and dimensions
245 - Border or shadow for definition
246 - Background color
247 - Border radius
248 - Internal padding
249 - Content sections (header, body, footer)
250
251- **Variants:**
252 - Basic card
253 - Card with image/media
254 - Card with header
255 - Card with actions/buttons
256 - Interactive cards (clickable, hoverable)
257 - List/feed cards
258
259- **Elevation:**
260 - Default shadow
261 - Hover shadow (if interactive)
262 - Border treatment vs shadow
263
264- **Internal spacing:**
265 - Content padding
266 - Spacing between sections
267 - Spacing around images
268
269**Navigation Components:**
270
271- **Navigation Bar/Header:**
272 - Height and padding
273 - Background color and transparency
274 - Border or shadow
275 - Logo size and positioning
276 - Navigation item spacing
277 - Mobile hamburger menu (if visible)
278
279- **Navigation Items:**
280 - Default text color and weight
281 - Hover state
282 - Active/current page indicator
283 - Underline, background, or other active indicators
284 - Dropdown indicators (if present)
285
286- **Breadcrumbs:**
287 - Separator style (/, >, icon)
288 - Text size and color
289 - Current item styling
290 - Link vs non-link items
291
292- **Tabs:**
293 - Tab button styling
294 - Active tab indicator (underline, background, border)
295 - Spacing between tabs
296 - Tab bar border/separator
297
298- **Sidebar Navigation:**
299 - Width
300 - Background color
301 - Item padding and spacing
302 - Active item styling
303 - Nested/collapsible sections
304 - Icons + text patterns
305
306**Modals/Dialogs:**
307
308- **Overlay/backdrop:**
309 - Background color and opacity
310 - Blur effect (if any)
311
312- **Modal container:**
313 - Width (fixed or responsive)
314 - Background color
315 - Border radius
316 - Shadow
317 - Padding
318 - Positioning (centered, top-offset)
319
320- **Header:**
321 - Title styling
322 - Close button (X icon, position, size)
323 - Border separator
324
325- **Body:**
326 - Content spacing
327 - Scrolling behavior
328
329- **Footer:**
330 - Button alignment (right, center, space-between)
331 - Button spacing
332 - Border separator
333
334**Alerts/Notifications:**
335
336- **Types:**
337 - Success (color, icon)
338 - Warning (color, icon)
339 - Error (color, icon)
340 - Info (color, icon)
341
342- **Structure:**
343 - Background color (solid or tinted)
344 - Border (left accent, full border)
345 - Border radius
346 - Padding
347 - Icon size and positioning
348 - Close/dismiss button
349 - Shadow or elevation
350
351- **Variants:**
352 - Inline alerts (within forms)
353 - Toast/snackbar notifications
354 - Banner notifications
355
356**Badges/Tags:**
357
358- **Appearance:**
359 - Size (height, padding)
360 - Border radius (rounded corners or pills)
361 - Background color variants
362 - Text size and weight
363 - Text transform (uppercase, etc.)
364
365- **Variants:**
366 - Status badges (success, warning, error, info)
367 - Count badges (notification counters)
368 - Removable tags (with X icon)
369 - Outlined vs filled
370
371**Loading States:**
372
373- **Spinners:**
374 - Size variants
375 - Color
376 - Animation speed and style
377
378- **Skeleton screens:**
379 - Shape and sizing
380 - Animation (pulse, shimmer)
381 - Color
382
383- **Progress bars:**
384 - Height
385 - Background and fill colors
386 - Border radius
387 - Indeterminate vs determinate
388
389**Tooltips:**
390
391- Background color
392- Text color and size
393- Padding
394- Border radius
395- Arrow/pointer style
396- Shadow
397- Max-width
398- Positioning relative to trigger
399
400**Dropdowns/Menus:**
401
402- Container background and border
403- Border radius
404- Shadow
405- Item padding
406- Item hover state
407- Divider style
408- Icon spacing
409- Max-height and scrolling
410
411**Other Components to Consider:**
412
413- Avatars (size variants, placeholder states)
414- Dividers/separators
415- Empty states
416- Error pages
417- Icons (size scale, style consistency)
418- Images (border radius, aspect ratios)
419- Lists (bullet/numbered styling, spacing)
420- Pagination
421- Search bars
422- Tables (header styling, row hover, borders)
423- Accordions/collapsible sections
424- Steppers/progress indicators
425- Date pickers
426- File upload components
427
428#### Component Documentation Template
429
430For each component identified, provide:
431
4321. **Component Name & Description**
433 - Brief explanation of purpose and usage
434
4352. **Visual Characteristics**
436 - Detailed measurements and styling
437 - Color values with tokens
438
4393. **Variants**
440 - List all variations discovered
441 - Visual differences between variants
442
4434. **States** (for interactive components)
444 - Default, hover, active, focus, disabled, loading, error, success
445
4465. **Sizing Options**
447 - Small, medium, large (if applicable)
448 - Responsive behavior
449
4506. **Composition Patterns**
451 - How the component combines with others
452 - Common usage patterns
453
4547. **CSS Implementation**
455 - Complete, copy-paste ready code
456 - Using design tokens
457 - Including all states and variants
458
4598. **Accessibility Notes**
460 - ARIA attributes needed
461 - Keyboard navigation patterns
462 - Focus management
463 - Color contrast issues (if any)
464
4659. **Usage Guidelines**
466 - When to use this component
467 - When NOT to use it
468 - Common patterns and anti-patterns
469
470## Output Format
471
472Present the analysis as a comprehensive, interactive design system documentation using the following structure:
473
474### Structure
475
476The output should follow this comprehensive structure, with heavy emphasis on the Components section:
477
478```markdown
479# Design System Documentation
480
481## 🎨 Design Tokens
482
483### Colors
484[Present complete color palette with visual swatches and tokens]
485
486### Typography
487[Present type scale with examples and CSS classes]
488
489### Spacing
490[Present spacing scale with usage examples]
491
492### Shadows & Effects
493[Document shadows, border radius, and other visual treatments]
494
495---
496
497## 📐 Components Library
498
499This is the MOST IMPORTANT section. Document every component identified with comprehensive detail.
500
501### Buttons
502
503#### Overview
504[Brief description of button usage in this design]
505
506#### Variants
507- **Primary Button**: [Description, usage, visual characteristics]
508- **Secondary Button**: [Description, usage, visual characteristics]
509- **Tertiary Button**: [Description, usage, visual characteristics]
510- **Ghost/Text Button**: [Description, usage, visual characteristics]
511- **Destructive Button**: [Description for dangerous actions]
512
513#### Sizing
514- Small: [Dimensions, padding, font size]
515- Medium (Default): [Dimensions, padding, font size]
516- Large: [Dimensions, padding, font size]
517
518#### States
519- Default
520- Hover
521- Active/Pressed
522- Focus
523- Disabled
524- Loading
525
526#### CSS Implementation
527[Complete button styles with all variants, sizes, and states]
528
529#### Usage Guidelines
530[When to use each variant, best practices]
531
532---
533
534### Form Components
535
536#### Text Input
537[Complete documentation following component template]
538
539#### Textarea
540[Complete documentation]
541
542#### Select/Dropdown
543[Complete documentation]
544
545#### Checkbox
546[Complete documentation]
547
548#### Radio Button
549[Complete documentation]
550
551#### Toggle/Switch
552[Complete documentation if present]
553
554---
555
556### Cards
557
558#### Overview
559[Card usage and purpose]
560
561#### Variants
562- Basic Card
563- Card with Header
564- Card with Image
565- Interactive Card
566- [Other variants found]
567
568#### Structure
569- Header styling
570- Body styling
571- Footer styling
572- Image/media treatment
573
574#### CSS Implementation
575[Complete card styles]
576
577---
578
579### Navigation
580
581#### Navigation Bar
582[Complete documentation]
583
584#### Navigation Items
585[Item styling, states, active indicators]
586
587#### Breadcrumbs
588[If present]
589
590#### Tabs
591[If present]
592
593#### Sidebar Navigation
594[If present]
595
596---
597
598### Modals & Overlays
599
600#### Modal/Dialog
601[Complete documentation including backdrop, structure, sizing]
602
603#### Tooltip
604[If present]
605
606#### Dropdown Menu
607[If present]
608
609#### Popover
610[If present]
611
612---
613
614### Feedback Components
615
616#### Alerts
617- Success Alert
618- Warning Alert
619- Error Alert
620- Info Alert
621
622[Complete documentation for each]
623
624#### Toast/Snackbar Notifications
625[If present]
626
627#### Loading States
628- Spinners
629- Skeleton screens
630- Progress bars
631
632---
633
634### Data Display
635
636#### Tables
637[If present - header, rows, borders, hover states]
638
639#### Lists
640[Styling for ordered/unordered lists]
641
642#### Empty States
643[If present]
644
645---
646
647### Other Components
648
649[Document any additional components found:]
650- Avatars
651- Badges/Tags
652- Dividers
653- Pagination
654- Search Bars
655- Accordions
656- Steppers
657- Date Pickers
658- [Etc.]
659
660---
661
662## 💻 Complete CSS Implementation
663
664### Design Tokens (CSS Variables)
665```css
666:root {
667 /* Colors */
668 --color-primary-500: #...;
669 --color-secondary-500: #...;
670
671 /* Typography */
672 --font-family-sans: ...;
673 --font-size-base: ...;
674
675 /* Spacing */
676 --spacing-xs: 4px;
677 --spacing-sm: 8px;
678 --spacing-md: 16px;
679
680 /* Shadows */
681 --shadow-sm: ...;
682 --shadow-md: ...;
683
684 /* Border Radius */
685 --radius-sm: ...;
686 --radius-md: ...;
687}
688```
689
690### Component Styles
691
692[Provide all component CSS in one place for easy copy-paste]
693
694---
695
696## 📱 Implementation Guidelines
697
698### Getting Started
699[How to use this design system]
700
701### Best Practices
702[General guidance]
703
704### Accessibility Notes
705[Important accessibility considerations across components]
706
707### Responsive Considerations
708[Any responsive patterns observed]
709```
710
711### Presentation Style
712
713- Use clear headings and sections with emoji for visual hierarchy
714- Include color swatches (use colored emoji or describe visually)
715- Provide both design tokens and CSS snippets
716- Make it actionable and implementation-ready
717- Include usage examples where helpful
718- Note any accessibility considerations (color contrast, focus states, etc.)
719
720## Best Practices
721
722**Be Thorough:**
723- Examine every visible element in the image
724- Look for subtle variations (hover states, shadows, borders)
725- Identify patterns and inconsistencies
726
727**Be Specific:**
728- Provide exact or well-estimated measurements
729- Use specific color values, not vague descriptions
730- Document context for each element
731
732**Be Actionable:**
733- Generate implementation-ready CSS
734- Suggest semantic naming conventions
735- Provide design tokens that can be used immediately
736
737**Consider Accessibility:**
738- Check color contrast ratios where possible
739- Note focus states and keyboard navigation cues
740- Suggest ARIA labels or semantic HTML where relevant
741
742**Organize Logically:**
743- Start with foundations (colors, typography, spacing)
744- Progress to components
745- Conclude with implementation code
746
747## Additional Notes
748
749- If the image quality makes it difficult to determine exact values, provide best estimates and note uncertainty
750- If multiple screens or states are visible, document variations
751- Consider responsive design patterns if multiple viewport sizes are shown
752- Look for design inconsistencies that should be standardized