UI
by @ivangdavila
Design clear, consistent, and visually polished user interfaces.
📖 About This Skill
name: UI
description: Design clear, consistent, and visually polished user interfaces.
metadata: {"clawdbot":{"emoji":"🎨","os":["linux","darwin","win32"]}}
Visual Hierarchy
One focal point per screen—eye knows where to go first
Size, color, weight establish importance—primary action most prominent
Group related elements—proximity implies relationship
White space is not wasted space—breathing room aids scanningTypography
Maximum 2-3 font families—more creates visual noise
Clear size scale: title > heading > body > caption—distinct steps, not gradual
Line height 1.4-1.6 for body text—too tight or loose hurts readability
Line length 45-75 characters—prevents eye fatigue
Left-align body text—centered only for short headingsColor Usage
Primary color for primary actions—one dominant brand color
Semantic colors consistent: red=error, green=success, yellow=warning
Don't rely on color alone—add icons, text, patterns for accessibility
Neutral palette for most UI—color for emphasis, not everywhere
Test color blindness scenarios—8% of men affectedSpacing System
Use consistent scale: 4px, 8px, 16px, 24px, 32px, 48px
Apply same spacing for same relationships—all card padding equal
More space around groups than within—visual grouping through proximity
Generous padding on touch targets—44px minimum for mobileAlignment
Grid system for consistency—8px or 4px base grid
Align to invisible lines—elements share edges, not scattered
Left edge strongest for LTR—anchor content predictably
Optical alignment when needed—visual center differs from mathematicalComponent States
Default, hover, active, focus, disabled—all states designed
Focus state visible and clear—keyboard users need this
Disabled looks disabled—reduced opacity, no pointer cursor
Loading state replaces content—not just overlay
Error state in context—red border, inline messageIcons
Consistent style throughout—don't mix outlined and filled
Recognizable at small sizes—simple shapes work better
Labels when meaning ambiguous—icon + text clearer than icon alone
Touch target larger than visual icon—44px tap area, 24px iconImagery
Consistent aspect ratios—don't stretch or skew
Fallback for failed loads—placeholder, not broken image
Alt text for content images—decorative images alt=""
Compress appropriately—quality vs file size balanceResponsive Design
Design for smallest screen first—enhance for larger
Breakpoints based on content—not arbitrary device widths
Touch targets larger on touch screens—hover states only on desktop
Consider landscape orientation—especially for tabletsDark Mode
Not just color inversion—redesign depth and emphasis
Reduce contrast slightly—pure white on black strains eyes
Shadows don't work same—use lighter surfaces for elevation
Test all states—errors, success, charts, images
Respect system preference—but allow overrideMotion and Animation
Duration 150-300ms for transitions—fast but perceptible
Ease-out for entering—starts fast, settles in
Ease-in for exiting—accelerates out of view
Consistent timing across similar interactions
Purpose: guide attention, show relationships, provide feedbackDesign Tokens
Define tokens for colors, spacing, typography—single source of truth
Semantic naming: color-error not color-red
Enables theming and dark mode—swap token values
Scales with product—change once, update everywhereCommon Mistakes
Too many font sizes—stick to the scale
Inconsistent spacing—creates unpolished feel
Low contrast text—4.5:1 minimum for accessibility
Buttons that don't look clickable—affordance matters
Different styles for same component—cards should match cards