install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/ui-design" ~/.claude/skills/comeonoliver-skillshub-ui-design-c8609a && rm -rf "$T"
manifest:
skills/pproenca/dot-skills/ui-design/SKILL.mdsource content
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 readersaccess-semantic-html
- Ensure full keyboard navigationaccess-keyboard-navigation
- Provide visible focus indicatorsaccess-focus-indicators
- Provide meaningful alt text for imagesaccess-alt-text
- Use ARIA labels for icon-only controlsaccess-aria-labels
- Ensure minimum touch target size (24×24px)access-target-size
- Maintain logical heading hierarchyaccess-heading-hierarchy
2. Core Web Vitals Optimization (CRITICAL)
- Optimize Largest Contentful Paint under 2.5scwv-optimize-lcp
- Minimize Cumulative Layout Shift under 0.1cwv-minimize-cls
- Improve Interaction to Next Paint under 200mscwv-improve-inp
- Serve responsive images with srcsetcwv-responsive-images
- Lazy load offscreen images and iframescwv-lazy-load-offscreen
- Inline critical CSS and defer the restcwv-critical-css
3. Visual Hierarchy & Layout (HIGH)
- Establish clear visual hierarchylayout-visual-hierarchy
- Use whitespace to improve readabilitylayout-whitespace
- Design for F-pattern reading behaviorlayout-f-pattern
- Use a consistent grid systemlayout-grid-system
- Limit to one primary CTA per screenlayout-single-cta
- Group related elements with proximitylayout-proximity-grouping
4. Responsive & Mobile-First Design (HIGH)
- Design mobile-first with min-width queriesresp-mobile-first
- Use fluid typography with clamp()resp-fluid-typography
- Use container queries for componentsresp-container-queries
- Size touch targets for mobile (44×44px)resp-touch-targets
- Configure viewport meta tag correctlyresp-viewport-meta
5. Typography & Font Loading (MEDIUM-HIGH)
- Use font-display to control loading behaviortypo-font-display
- Preload critical web fontstypo-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 elementstypo-system-font-stack
6. Color & Contrast (MEDIUM)
- Meet WCAG contrast ratio requirements (4.5:1)color-contrast-ratio
- Never use color alone to convey informationcolor-not-only-indicator
- Support dark mode with prefers-color-schemecolor-dark-mode
- Use semantic color names in design tokenscolor-semantic-palette
7. Forms & Validation UX (MEDIUM)
- Use inline validation after field blurform-inline-validation
- Write actionable error messagesform-error-messages
- Place labels above input fieldsform-labels-above
- Use correct HTML input types for mobileform-input-types
- Enable browser autocomplete with correct attributesform-autocomplete
8. Animation & Performance (LOW-MEDIUM)
- Animate only GPU-accelerated propertiesanim-gpu-properties
- Use will-change sparingly for animation hintsanim-will-change
- Respect user motion preferencesanim-reduced-motion
- Use appropriate animation duration and easinganim-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