Use when analyzing UI screenshots or designs to extract and document design system elements...
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.
Use this skill when:
When analyzing a UI image, systematically examine and document the following elements in order:
Identify and categorize all colors visible in the UI:
Primary Colors:
Secondary Colors:
Accent Colors:
Background Colors:
Text Colors:
Gradients (if needed) Some design are heavy on gradients, document them if needed
For each color, provide:
--color-primary-500)Examine all text elements and document:
Font Families:
Heading Styles (h1-h6):
Body Text Styles:
Special Text Styles:
For each style, generate:
Analyze spatial relationships and document:
Spacing Scale:
Padding Patterns:
Margin Patterns:
Grid System:
Provide spacing tokens like:
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
Components are the building blocks of the UI. Systematically identify, analyze, and document each recurring UI pattern with comprehensive detail.
Buttons:
For each button variant found:
Visual characteristics:
Variants to identify:
Sizes:
States: Document visual changes for:
Icon combinations:
CSS Implementation: Provide complete styles including transitions
Input Fields:
Analyze all form controls:
Text Inputs:
Textareas:
Select Dropdowns:
Checkboxes:
Radio Buttons:
Toggles/Switches:
Label patterns:
Cards:
Structure:
Variants:
Elevation:
Internal spacing:
Navigation Components:
Navigation Bar/Header:
Navigation Items:
Breadcrumbs:
Tabs:
Sidebar Navigation:
Modals/Dialogs:
Overlay/backdrop:
Modal container:
Header:
Body:
Footer:
Alerts/Notifications:
Types:
Structure:
Variants:
Badges/Tags:
Appearance:
Variants:
Loading States:
Spinners:
Skeleton screens:
Progress bars:
Tooltips:
Dropdowns/Menus:
Other Components to Consider:
For each component identified, provide:
Component Name & Description
Visual Characteristics
Variants
States (for interactive components)
Sizing Options
Composition Patterns
CSS Implementation
Accessibility Notes
Usage Guidelines
Present the analysis as a comprehensive, interactive design system documentation using the following 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: ...;
}
[Provide all component CSS in one place for easy copy-paste]
[How to use this design system]
[General guidance]
[Important accessibility considerations across components]
[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