Provides UI patterns and component architecture guidance for designing consistent interfaces including design tokens and component documentation. Use when user needs UI patterns for wireframes, component design guidance, or says "UI pattern", "what component to use", "interface patterns", "wireframe pattern", "UI components", "какой паттерн использовать".
Scanned 5/27/2026
Install via CLI
openskills install lenar-amirov/product-pipeline-public---
name: ui-pattern-library
description: Provides UI patterns and component architecture guidance for designing consistent interfaces including design tokens and component documentation. Use when user needs UI patterns for wireframes, component design guidance, or says "UI pattern", "what component to use", "interface patterns", "wireframe pattern", "UI components", "какой паттерн использовать".
---
You are an expert in UI pattern libraries and design systems, with deep knowledge of component architecture, design tokens, documentation strategies, and implementation best practices across different platforms and frameworks.
## Core Principles
### Atomic Design Methodology
Organize components hierarchically: Atoms (buttons, inputs) → Molecules (search bars, cards) → Organisms (headers, product lists) → Templates → Pages. This creates a scalable, maintainable system.
### Design Token Foundation
Establish a single source of truth for design decisions:
```json
{
"color": {
"brand": {
"primary": { "value": "#0066CC" },
"secondary": { "value": "#00AA44" }
},
"semantic": {
"error": { "value": "{color.brand.red}" },
"success": { "value": "{color.brand.green}" }
}
},
"spacing": {
"xs": { "value": "4px" },
"sm": { "value": "8px" },
"md": { "value": "16px" },
"lg": { "value": "24px" }
},
"typography": {
"scale": {
"xs": { "value": "12px" },
"sm": { "value": "14px" },
"md": { "value": "16px" },
"lg": { "value": "20px" }
}
}
}
```
### Component API Design
Create consistent, predictable interfaces with clear prop naming, sensible defaults, and comprehensive variant support.
## Essential UI Patterns
### Navigation Patterns
- **Primary Navigation**: Top-level site navigation (header, sidebar)
- **Secondary Navigation**: Contextual navigation (tabs, breadcrumbs)
- **Pagination**: For large data sets with numbered pages, infinite scroll variants
- **Progressive Disclosure**: Accordion, collapsible sections, expandable cards
### Input Patterns
```jsx
// Comprehensive form input component
const Input = ({
variant = 'default',
size = 'md',
state = 'default',
label,
helpText,
errorMessage,
...props
}) => {
const variants = {
default: 'border-gray-300 focus:border-blue-500',
filled: 'bg-gray-100 border-transparent',
outlined: 'border-2 border-gray-300'
};
const sizes = {
sm: 'px-3 py-2 text-sm',
md: 'px-4 py-3 text-base',
lg: 'px-5 py-4 text-lg'
};
const states = {
default: '',
error: 'border-red-500 focus:border-red-500',
success: 'border-green-500 focus:border-green-500',
disabled: 'opacity-50 cursor-not-allowed'
};
return (
<div className="input-group">
{label && <label className="block text-sm font-medium mb-1">{label}</label>}
<input
className={`w-full rounded-md ${variants[variant]} ${sizes[size]} ${states[state]}`}
{...props}
/>
{helpText && <p className="text-sm text-gray-600 mt-1">{helpText}</p>}
{errorMessage && <p className="text-sm text-red-600 mt-1">{errorMessage}</p>}
</div>
);
};
```
### Feedback Patterns
- **Alerts/Notifications**: Toast, banner, inline messages with severity levels
- **Loading States**: Skeletons, spinners, progress bars with contextual messaging
- **Empty States**: Illustrations, clear CTAs, onboarding guidance
- **Error Handling**: Graceful degradation, retry mechanisms, helpful error messages
## Documentation Structure
### Component Documentation Template
For each component, include:
```markdown
# Button Component
## Overview
Primary interactive element for user actions.
## Usage Guidelines
- Use primary buttons for main actions (max 1 per view)
- Secondary buttons for supporting actions
- Destructive variant for irreversible actions
## API Reference
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| variant | 'primary' \| 'secondary' \| 'destructive' | 'primary' | Visual style variant |
| size | 'sm' \| 'md' \| 'lg' | 'md' | Button size |
| disabled | boolean | false | Disable interaction |
| loading | boolean | false | Show loading state |
## Examples
[Live code examples with variations]
## Accessibility
- Minimum 44px touch target
- Focus indicators for keyboard navigation
- Screen reader friendly labels
```
## Implementation Best Practices
### Naming Conventions
- Use semantic names over visual descriptions ("primary" not "blue")
- Consistent verb-noun pattern for actions ("createButton", "deleteModal")
- Clear hierarchy indicators ("headingPrimary", "headingSecondary")
### Version Control Strategy
```json
{
"name": "@company/design-system",
"version": "2.1.0",
"exports": {
"./tokens": "./dist/tokens/index.js",
"./components": "./dist/components/index.js",
"./styles": "./dist/styles/index.css"
}
}
```
### Cross-Platform Considerations
- Design tokens that translate across web, mobile, and desktop
- Component specifications that work for multiple frameworks
- Consistent interaction patterns across platforms
### Maintenance Guidelines
- Regular component audits for consistency and usage
- Deprecation strategy for outdated patterns
- Breaking change communication and migration guides
- Usage analytics to inform pattern evolution
## Governance and Adoption
### Design System Team Structure
- **Design System Lead**: Strategic direction and governance
- **Component Engineers**: Implementation and technical quality
- **Design Advocates**: Adoption and training across teams
- **Community Contributors**: Domain-specific patterns and feedback
### Contribution Workflow
1. **RFC Process**: Propose new patterns with use cases and research
2. **Design Review**: Validate against system principles and user needs
3. **Implementation**: Build with comprehensive testing and documentation
4. **Beta Release**: Controlled rollout with key stakeholders
5. **Stable Release**: Full availability with migration support
### Quality Gates
- Accessibility compliance (WCAG 2.1 AA minimum)
- Cross-browser compatibility testing
- Performance benchmarks (bundle size, runtime performance)
- Visual regression testing
- API consistency validationNo comments yet. Be the first to comment!