ui-design
Original:🇺🇸 English
Translated
UI/UX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.
2installs
Sourcepproenca/dot-skills
Added on
NPX Install
npx skill4agent add pproenca/dot-skills ui-designTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →UI/UX Best Practices Frontend Design
Comprehensive UI/UX and frontend design best practices guide. Contains 42 rules across 8 categories, prioritized by impact to guide accessible, performant, and user-friendly interface development.
When to Apply
Reference these guidelines when:
- Structuring HTML for accessibility and semantics
- Writing CSS for responsive layouts and visual hierarchy
- Optimizing images and fonts for Core Web Vitals
- Designing forms with proper validation and error handling
- Adding animations and interactive elements
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Accessibility & WCAG Compliance | CRITICAL | |
| 2 | Core Web Vitals Optimization | CRITICAL | |
| 3 | Visual Hierarchy & Layout | HIGH | |
| 4 | Responsive & Mobile-First Design | HIGH | |
| 5 | Typography & Font Loading | MEDIUM-HIGH | |
| 6 | Color & Contrast | MEDIUM | |
| 7 | Forms & Validation UX | MEDIUM | |
| 8 | Animation & Performance | LOW-MEDIUM | |
Quick Reference
1. Accessibility & WCAG Compliance (CRITICAL)
- - Use semantic HTML elements for screen readers
access-semantic-html - - Ensure full keyboard navigation
access-keyboard-navigation - - Provide visible focus indicators
access-focus-indicators - - Provide meaningful alt text for images
access-alt-text - - Use ARIA labels for icon-only controls
access-aria-labels - - Ensure minimum touch target size (24×24px)
access-target-size - - Maintain logical heading hierarchy
access-heading-hierarchy
2. Core Web Vitals Optimization (CRITICAL)
- - Optimize Largest Contentful Paint under 2.5s
cwv-optimize-lcp - - Minimize Cumulative Layout Shift under 0.1
cwv-minimize-cls - - Improve Interaction to Next Paint under 200ms
cwv-improve-inp - - Serve responsive images with srcset
cwv-responsive-images - - Lazy load offscreen images and iframes
cwv-lazy-load-offscreen - - Inline critical CSS and defer the rest
cwv-critical-css
3. Visual Hierarchy & Layout (HIGH)
- - Establish clear visual hierarchy
layout-visual-hierarchy - - Use whitespace to improve readability
layout-whitespace - - Design for F-pattern reading behavior
layout-f-pattern - - Use a consistent grid system
layout-grid-system - - Limit to one primary CTA per screen
layout-single-cta - - Group related elements with proximity
layout-proximity-grouping
4. Responsive & Mobile-First Design (HIGH)
- - Design mobile-first with min-width queries
resp-mobile-first - - Use fluid typography with clamp()
resp-fluid-typography - - Use container queries for components
resp-container-queries - - Size touch targets for mobile (44×44px)
resp-touch-targets - - Configure viewport meta tag correctly
resp-viewport-meta
5. Typography & Font Loading (MEDIUM-HIGH)
- - Use font-display to control loading behavior
typo-font-display - - Preload critical web fonts
typo-preload-fonts - - Constrain line length (45-75ch)
typo-readable-line-length - - Set appropriate line height (1.5-1.7)
typo-line-height - - Use system font stack for UI elements
typo-system-font-stack
6. Color & Contrast (MEDIUM)
- - Meet WCAG contrast ratio requirements (4.5:1)
color-contrast-ratio - - Never use color alone to convey information
color-not-only-indicator - - Support dark mode with prefers-color-scheme
color-dark-mode - - Use semantic color names in design tokens
color-semantic-palette
7. Forms & Validation UX (MEDIUM)
- - Use inline validation after field blur
form-inline-validation - - Write actionable error messages
form-error-messages - - Place labels above input fields
form-labels-above - - Use correct HTML input types for mobile
form-input-types - - Enable browser autocomplete with correct attributes
form-autocomplete
8. Animation & Performance (LOW-MEDIUM)
- - Animate only GPU-accelerated properties
anim-gpu-properties - - Use will-change sparingly for animation hints
anim-will-change - - Respect user motion preferences
anim-reduced-motion - - Use appropriate animation duration and easing
anim-duration-easing
How to Use
Read individual reference files for detailed explanations and code examples:
- Section definitions - Category structure and impact levels
- Rule template - Template for adding new rules
- Example: access-semantic-html
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md