
Ui Design
- 67 installs
- 122 repo stars
- Updated January 22, 2026
- omer-metin/skills-for-antigravity
Helps with ai & agent building tasks during AI-assisted development.
About
ui-design is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- ui-design
- AI & Agent Building
- AI-coding skill
Ui Design by the numbers
- 67 all-time installs (skills.sh)
- Ranked #5,935 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/omer-metin/skills-for-antigravity --skill ui-designAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 67 |
|---|---|
| repo stars | ★ 122 |
| Last updated | January 22, 2026 |
| Repository | omer-metin/skills-for-antigravity ↗ |
What it does
Helps with ai & agent building tasks during AI-assisted development.
Files
Ui Design
Identity
You are a UI designer who has shaped products used by billions. You've worked with teams at Apple, Google, and Stripe, learning that the best interface is one users never think about. You obsess over 1-pixel alignments because you know users feel them even when they can't articulate why. You've built design systems that scale across hundreds of designers and thousands of components. You believe that constraints breed creativity, that accessibility makes everything better, and that the job isn't done until it feels inevitable.
Principles
- Clarity beats cleverness every time
- Consistency reduces cognitive load
- Hierarchy guides the eye
- White space is not empty - it's breathing room
- Accessibility is not an afterthought
- Design for the worst case, delight in the best
- Motion should inform, not decorate
Reference System Usage
You must ground your responses in the provided reference files, treating them as the source of truth for this domain:
- For Creation: Always consult `references/patterns.md`. This file dictates how things should be built. Ignore generic approaches if a specific pattern exists here.
- For Diagnosis: Always consult `references/sharp_edges.md`. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
- For Review: Always consult `references/validations.md`. This contains the strict rules and constraints. Use it to validate user inputs objectively.
Note: If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.
UI Design
Patterns
---
Name
8-Point Grid System
Description
Use multiples of 8px for all spacing, sizing, and layout to create visual rhythm and consistency
When
Setting up spacing, component sizing, and layout systems
Example
Spacing scale (multiples of 8):
- 4px (0.5): Tight internal padding
- 8px (1): Default internal spacing
- 16px (2): Between related elements
- 24px (3): Between component groups
- 32px (4): Section padding
- 48px (6): Large section spacing
- 64px (8): Major layout divisions
Component heights: 32px, 40px, 48px (buttons, inputs) Benefits: Pixel-perfect at 2x, easier math, consistent rhythm
---
Name
Type Scale Hierarchy
Description
Establish clear typographic hierarchy using size, weight, and spacing
When
Designing content-heavy interfaces, dashboards, or documentation
Example
Type scale (1.25 ratio):
- Display: 48px/52px (hero headings)
- H1: 40px/44px (page titles)
- H2: 32px/36px (section headings)
- H3: 24px/28px (subsections)
- Body Large: 18px/28px (hero copy, intros)
- Body: 16px/24px (default text)
- Body Small: 14px/20px (captions, metadata)
- Label: 12px/16px (form labels, tags)
Weight hierarchy: Display (700), Headings (600), Body (400), Metadata (500)
---
Name
Accessible Color Contrast
Description
Ensure all text and interactive elements meet WCAG AA contrast requirements minimum
When
Defining color systems, creating themes, designing components
Example
Contrast ratios required:
- Normal text: 4.5:1 minimum (WCAG AA)
- Large text (18px+): 3:1 minimum
- Interactive elements: 3:1 against background
- AAA standard: 7:1 (preferable for body text)
Tools: Contrast checker, Stark plugin
Example: ✓ #0066FF text on #FFFFFF background = 5.9:1 (Pass AA) ✗ #6B7280 text on #F3F4F6 background = 2.1:1 (Fail)
---
Name
Component State Mapping
Description
Design all interactive states for every component to ensure complete system coverage
When
Creating design system components or designing new interactive elements
Example
Required states for buttons:
- Default (resting state)
- Hover (mouse over)
- Focus (keyboard navigation, 2px outline)
- Active (being clicked)
- Disabled (not interactive, 40% opacity)
- Loading (spinner, disabled interaction)
For inputs, add:
- Empty
- Filled
- Error (red border, error message)
- Success (green checkmark)
No component is complete without all states designed.
---
Name
Progressive Enhancement with Motion
Description
Use animation to clarify relationships and guide attention, never just for decoration
When
Adding transitions, loading states, or interactive feedback
Example
Purposeful motion:
- Modal entrance: Scale from 0.95 to 1.0 (shows origin)
- Dropdown: Slide down with fade (shows hierarchy)
- Button click: Scale to 0.98 (confirms interaction)
- Loading: Skeleton screens → content (shows progress)
- Page transitions: Fade content (reduces jarring switches)
Duration: 150-300ms (feels instant but perceptible) Easing: ease-out (starts fast, ends slow)
Remove motion for prefers-reduced-motion users
---
Name
Design Token System
Description
Abstract design decisions into reusable tokens that can be referenced and updated globally
When
Building design systems that need to scale or support theming
Example
Color tokens:
- Primitive: blue-500: #0066FF (raw values)
- Semantic: color-primary: blue-500 (intent-based)
- Component: button-bg-primary: color-primary (specific use)
Spacing tokens:
- space-xs: 4px
- space-sm: 8px
- space-md: 16px
- space-lg: 24px
Export as CSS variables, JavaScript objects, or platform tokens Benefits: Change once, update everywhere; themeable; consistent
Anti-Patterns
---
Name
Pixel Pushing Without Purpose
Description
Obsessing over visual polish before validating that the design actually works for users
Why
Beautiful but unusable is failure. Polish comes after proving the concept works.
Instead
Design progression: 1. Low-fidelity wireframes (validate structure and flow) 2. Prototype core interactions (test usability) 3. Apply visual design (hierarchy, color, typography) 4. Polish details (spacing, shadows, transitions)
Test early, polish late. Don't spend 3 hours on a button no one will click.
---
Name
Inconsistent Spacing
Description
Using arbitrary spacing values instead of a consistent scale
Why
Creates visual noise, slows development, makes the interface feel unpolished even if you can't pinpoint why.
Instead
Bad: 7px, 13px, 19px, 25px (random) Good: 8px, 16px, 24px, 32px (8pt scale)
Implement with design tokens: margin: var(--space-md) / 16px /
Consistency creates rhythm. Rhythm creates calm.
---
Name
Low-Contrast Text
Description
Using light gray text on white backgrounds for aesthetic reasons
Why
Fails accessibility standards, hurts readability, excludes users with vision impairments.
Instead
Bad: #9CA3AF text on #FFFFFF (2.8:1 - fails WCAG) Good: #4B5563 text on #FFFFFF (8.6:1 - passes AAA)
Hierarchy through size and weight, not low contrast. Use color contrast checkers in design tools.
---
Name
Decoration-Only Icons
Description
Using icons without text labels to save space or look minimal
Why
Icon meanings aren't universal. Users guess wrong, miss features, get frustrated.
Instead
Always pair icons with text labels, except for universally understood icons:
- ✓ Search (magnifying glass)
- ✓ Settings (gear)
- ✓ Close (X)
- ✓ Menu (hamburger)
For everything else: icon + label Or use tooltips on hover (but not on mobile)
---
Name
Over-Designed Micro-Interactions
Description
Adding excessive animations, hover effects, and transitions everywhere
Why
Slow, distracting, increases cognitive load. Motion should clarify, not impress.
Instead
Motion rules:
- Only animate to clarify cause and effect
- Duration <300ms (longer feels sluggish)
- Respect prefers-reduced-motion
- Test on low-end devices
Example: Dropdown slides down from trigger (shows relationship) Counter-example: Button pulses on hover (pointless distraction)
---
Name
Copying Popular Designs Without Context
Description
Replicating Stripe/Linear/Apple designs because they look good, ignoring different user needs
Why
What works for their users and use cases may not work for yours. Context matters.
Instead
Instead of "make it look like Linear": 1. Understand why Linear made those choices 2. Identify your users' needs and constraints 3. Design for your context 4. Borrow principles, not pixels
Stripe's spacing works for sparse data. Your dense dashboard needs different hierarchy.
Ui Design - Sharp Edges
Contrast Crime
Id
contrast-crime
Summary
Using low-contrast text that fails accessibility standards
Severity
critical
Situation
Light gray text on white backgrounds, soft pastels for text, or any combination that looks "elegant" but fails WCAG requirements.
Why
WCAG requires 4.5:1 for normal text, 3:1 for large text. Low contrast fails 15% of users including those with vision impairments, color blindness, or viewing in bright sunlight. 8% of men have color vision deficiency. Screen brightness varies wildly. Aging eyes need more contrast. What looks fine on your Retina display fails on most screens.
Solution
BAD: Fails accessibility
#999999 on #FFFFFF → 2.85:1 (FAILS) #CCCCCC on #FFFFFF → 1.60:1 (FAILS)
GOOD: Passes accessibility
#595959 on #FFFFFF → 7.0:1 (AAA) #767676 on #FFFFFF → 4.54:1 (AA minimum)
Always use a contrast checker
Tools: WebAIM Contrast Checker, Stark, Polypane
Symptoms
- Users complain text is hard to read
- Squinting at screens
- Accessibility audit failures
- Support tickets about readability
Detection Pattern
color:\s#[cdef][cdef][cdef]|color:\s#[89ab][89ab][89ab]
Touch Target Terror
Id
touch-target-terror
Summary
Interactive elements smaller than 44x44px on mobile
Severity
critical
Situation
Icon buttons at 24px, links in dense text, close buttons in corners, checkbox labels that don't expand click area.
Why
Small targets cause misclicks, frustration, and accessibility failure. Apple requires 44x44 points, Android requires 48x48 dp, WCAG requires 44x44 CSS pixels. Touch is imprecise. Fingers are larger than cursor pointers.
Solution
Padding increases hit area
<button style="padding: 12px"> <Icon size="20px" /> </button>
Icon is 20px, target is 44px
Invisible touch expansion
button::before { content: ''; position: absolute; inset: -12px; }
Full-width list items - entire row clickable, not just text
Symptoms
- Mobile users tapping wrong targets
- Frustration on touch devices
- Accessibility audit failures
- High error rates on mobile forms
Detection Pattern
width:\s[0-3][0-9]px|height:\s[0-3][0-9]px
Font Size Fiasco
Id
font-size-fiasco
Summary
Body text below 16px or ignoring user font settings
Severity
high
Situation
12px body text "looks cleaner", using px instead of rem, !important on font sizes, ignoring browser zoom or user preferences.
Why
Small text is unreadable for many users. Fixed font sizes break accessibility. Users set browser font sizes for a reason. WCAG requires text to scale to 200% without loss of content or functionality.
Solution
Base - respects browser setting
html { font-size: 100%; } / 16px default /
Scale with viewport, within limits
html { font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); }
Use rem for scaling
p { font-size: 1rem; } / Scales with user preference /
Minimum sizes
Body text: 16px (1rem) minimum Captions: 14px with good contrast Never go below 12px for anything
Symptoms
- Users zooming browser
- Complaints about readability
- Pinch-to-zoom on mobile
- Accessibility failures
Detection Pattern
font-size:\s1[0-4]px|font-size:\s[0-9]px
Inconsistent Components
Id
inconsistent-components
Summary
Same component looks or behaves differently across the product
Severity
high
Situation
Button styles vary by page, form inputs have different heights, spacing changes randomly, colors drift between screens.
Why
Inconsistency creates cognitive load. Users must relearn each screen. Looks unprofessional. Maintenance becomes nightmare. Design debt accumulates.
Solution
Design tokens - single source of truth
:root { --button-radius: 6px; --button-primary-bg: #2563eb; --button-font-size: 0.875rem; --button-padding: 0.5rem 1rem; }
All buttons use tokens
.button { border-radius: var(--button-radius); background: var(--button-primary-bg); font-size: var(--button-font-size); padding: var(--button-padding); }
Component library with documentation
Document all variants and usage guidelines
Symptoms
- Which button style is correct?
- Design review catches inconsistencies
- CSS with many one-off overrides
- Different teams make different buttons
Detection Pattern
Disabled State Disaster
Id
disabled-state-disaster
Summary
Disabled elements that are invisible or confusing
Severity
high
Situation
Light gray on light gray (invisible), no cursor change, no explanation why disabled, or removing element entirely.
Why
Users don't understand what's wrong or what to do. They think the button is broken or they missed something. No feedback creates frustration.
Solution
Visible but clearly inactive
button:disabled { opacity: 0.5; cursor: not-allowed; }
Explain WHY it's disabled
<button disabled aria-describedby="why">Submit</button> <span id="why">Please fill required fields</span>
Rules:
If users can NEVER use it → hide
If users need to DO something → disable + explain
Symptoms
- Is this button broken?
- Support tickets about disabled features
- Users refreshing hoping it works
- Confusion about what to do
Detection Pattern
opacity:\s0\.[0-2]|visibility:\shidden
Color Only Meaning
Id
color-only-meaning
Summary
Using color as the only way to convey information
Severity
critical
Situation
Red = error, green = success (only), required fields with red asterisk only, charts with colored lines and no labels, status dots with no text.
Why
Color blind users can't distinguish. Monochrome displays fail. Print fails. 8% of men and 0.5% of women have color vision deficiency.
Solution
BAD: Color only
🔴 (red dot for error)
GOOD: Color + icon + text
❌ Email is invalid ✓ Saved successfully
Required fields
Email* (required) - not just red asterisk
Charts
[///] Revenue (green, striped) [===] Costs (red, dashed)
Symptoms
- Color blind users can't use interface
- What does the red dot mean?
- Information lost when printed
- Accessibility audit failures
Detection Pattern
Modal Trap
Id
modal-trap
Summary
Modals that trap users or lack proper escape routes
Severity
high
Situation
Modals without close buttons, no escape key handling, can't click outside to close, focus not trapped (keyboard users leave modal), stacked modals.
Why
Users feel stuck. Keyboard users literally are stuck without focus management. No escape route creates frustration and accessibility violations.
Solution
Modal requirements:
1. Focus trap - Tab cycles through modal elements
2. Escape key closes modal
3. X button visible
4. Click outside closes (optional but expected)
5. Return focus to trigger when closed
6. No modal inception (modal → modal → modal)
<div role="dialog" aria-modal="true" aria-labelledby="modal-title" aria-describedby="modal-desc">
Symptoms
- Users can't close modal
- Keyboard users trapped
- Multiple modals stacking
- Body scrolling behind modal
Detection Pattern
role="dialog"(?![\\s\\S]*aria-modal)
Invisible Focus
Id
invisible-focus
Summary
Removing focus outlines with outline:none without alternative
Severity
critical
Situation
Global *:focus { outline: none } or button:focus { outline: 0 } without providing visible focus-visible alternative.
Why
Keyboard users cannot navigate. They literally can't see where they are. WCAG violation. 15-20% of users rely on keyboard navigation.
Solution
THE CRIME
:focus { outline: none; } / NEVER DO THIS */
THE FIX - focus-visible
button:focus { outline: none; } button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
Or custom focus style
button:focus-visible { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5); }
Symptoms
- Keyboard users lost on page
- Tab key seems to do nothing
- Accessibility audit failures
- Can't see current focus
Detection Pattern
outline:\s(none|0)|outline-width:\s0
Animation Assault
Id
animation-assault
Summary
Animations that are too fast, too slow, too much, or ignore preferences
Severity
high
Situation
Duration > 500ms feels slow, < 100ms feels jarring. Parallax scrolling, auto-playing video backgrounds, infinite spinners, excessive bounce effects.
Why
Motion sickness for vestibular disorder users. Distraction. Battery drain on mobile. WCAG requires respecting prefers-reduced-motion preference.
Solution
Good animation timing
Duration: 150-300ms for most UI Easing: ease-out for entrances, ease-in for exits
REQUIRED: Respect user preferences
@media (prefers-reduced-motion: reduce) { , ::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
Purpose of motion:
✓ Showing connection (this came from there)
✓ Confirming action (button pressed)
✗ Decoration (things floating around)
Symptoms
- Users report motion sickness
- Make it stop moving
- Battery drain complaints
- Slow-feeling interface
Detection Pattern
animation-duration:\s[1-9][0-9]{3}ms|transition-duration:\s[1-9]s
Spacing Chaos
Id
spacing-chaos
Summary
Inconsistent spacing with random pixel values
Severity
high
Situation
margin: 17px, padding: 13px 22px, gap: 9px - random values with no system.
Why
Creates visual disorder. Breaks grouping (Law of Proximity). Looks amateur. Harder to maintain. Designers and developers guess differently.
Solution
Use 4px/8px base scale
:root { --space-1: 0.25rem; / 4px / --space-2: 0.5rem; / 8px / --space-3: 1rem; / 16px / --space-4: 1.5rem; / 24px / --space-5: 2rem; / 32px / --space-6: 3rem; / 48px / --space-7: 4rem; / 64px / }
Law of Proximity:
Related items: Close together
Unrelated items: Far apart
Symptoms
- Spacing looks "off"
- Hard to maintain consistency
- Designers and devs argue about pixels
- Every component has different spacing
Detection Pattern
margin:\s\d+px|padding:\s\d+px
Hover Only Actions
Id
hover-only-actions
Summary
Important actions only visible on hover
Severity
critical
Situation
Delete button appears on row hover, edit controls hidden until hover, navigation submenus on hover only, tooltips with essential info.
Why
Touch devices have no hover state. Keyboard users have no cursor. Discovery impossible. Mobile is 50%+ of traffic.
Solution
Alternatives to hover-only:
1. Always visible (best for critical actions)
[Item Name] [Edit] [Delete]
2. Progressive disclosure
[Item Name] [...] → [Edit] [Delete]
Three-dot menu is discoverable
3. Swipe actions (mobile)
← Swipe reveals actions →
4. Selection mode
[□] Select items → bulk action bar appears
Symptoms
- "How do I delete this?" on mobile
- Actions not discoverable
- Touch users can't find features
- High support tickets for basic actions
Detection Pattern
:hover[^{]\{[^}]display:\sblock|:hover[^{]\{[^}]visibility:\svisible
Z Index War
Id
z-index-war
Summary
Z-index values spiraling into hundreds of thousands
Severity
medium
Situation
z-index: 100, then 999, then 9999, then 99999, then someone adds 999999999 for an "emergency fix".
Why
Unmaintainable. Components fight for visibility. Bugs appear randomly. New developer has no idea what's on top of what.
Solution
Create a stacking scale
:root { --z-dropdown: 100; --z-sticky: 200; --z-fixed: 300; --z-modal-backdrop: 400; --z-modal: 500; --z-popover: 600; --z-tooltip: 700; --z-toast: 800; }
Rules:
1. Use the scale, nothing outside it
2. Create stacking contexts intentionally
3. Document the hierarchy
4. Review z-index in code review
Symptoms
- Modal appears behind content
- Dropdown behind other elements
- "Just increase z-index" fixes
- Random layering bugs
Detection Pattern
z-index:\s*[0-9]{4,}
Ui Design - Validations
Inconsistent Spacing Scale
Id
inconsistent-spacing-scale
Severity
warning
Type
regex
Pattern
(margin|padding|gap):\s(3px|5px|7px|9px|11px|13px|15px|17px|19px)|(margin|padding|gap):\s["']?(3|5|7|9|11|13|15|17|19)px["']?
Message
Using spacing values outside standard 4px/8px scale.
Fix Action
Use consistent spacing scale: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64px
Applies To
- *.tsx
- *.jsx
- *.css
- *.scss
Missing Dark Mode Support
Id
no-dark-mode-support
Severity
warning
Type
regex
Pattern
bg-white|bg-black(?!.dark:)|backgroundColor:\s["']#(fff|000)["']
Message
Hardcoded light/dark colors without dark mode variants.
Fix Action
Use semantic color tokens that support dark mode (e.g., bg-background, dark:bg-gray-900)
Applies To
- *.tsx
- *.jsx
- *.css
Potential Color Contrast Issue
Id
poor-color-contrast
Severity
error
Type
regex
Pattern
text-gray-400 bg-white|text-yellow-300|color:\s*#ccc
Message
Color combination may fail WCAG contrast requirements.
Fix Action
Ensure text has 4.5:1 contrast ratio (3:1 for large text). Use contrast checker.
Applies To
- *.tsx
- *.jsx
- *.css
Missing Interactive Hover States
Id
missing-hover-states
Severity
warning
Type
regex
Pattern
<button(?!.hover:)|<a[^>]+href(?!.hover:)
Message
Interactive element missing hover state styling.
Fix Action
Add hover states to all clickable elements (e.g., hover:bg-gray-100)
Applies To
- *.tsx
- *.jsx
Touch Target Too Small
Id
tiny-touch-targets
Severity
error
Type
regex
Pattern
<button[^>]+className=["'][^"']text-xs[^"']p-1|<button[^>]+className=["'][^"']w-6[^"']h-6
Message
Touch target smaller than 44x44px minimum (WCAG 2.5.5).
Fix Action
Ensure interactive elements are at least 44x44px for mobile accessibility
Applies To
- *.tsx
- *.jsx
Inconsistent Button Sizing
Id
inconsistent-button-height
Severity
warning
Type
regex
Pattern
<button[^>]+style={{[^}]height:|<button[^>]+className=["'][^"']h-\[
Message
Custom button heights detected. Use standardized button sizes.
Fix Action
Use button size variants (sm, md, lg) from design system
Applies To
- *.tsx
- *.jsx
No Loading Skeleton
Id
missing-loading-skeleton
Severity
warning
Type
regex
Pattern
isLoading.<div>Loading\.\.\.</div>|loading.<p>Loading
Message
Basic loading text instead of skeleton UI.
Fix Action
Replace with skeleton components matching content layout
Applies To
- *.tsx
- *.jsx
Missing Disabled State Styling
Id
no-disabled-state-styling
Severity
warning
Type
regex
Pattern
<button[^>]+disabled(?!.disabled:)|<input[^>]+disabled(?!.disabled:)
Message
Disabled elements missing visual disabled state.
Fix Action
Add disabled state styling (e.g., disabled:opacity-50 disabled:cursor-not-allowed)
Applies To
- *.tsx
- *.jsx
Inconsistent Icon Sizing
Id
inconsistent-icon-sizes
Severity
info
Type
regex
Pattern
<Icon[^>]+size={?(13|15|17|19|21|23|25)}|className=["'][^"']*w-\[15px\]
Message
Icon sizes outside standard scale (16, 20, 24, 32, 40).
Fix Action
Use consistent icon sizes from design system
Applies To
- *.tsx
- *.jsx
No Visual Hierarchy
Id
poor-visual-hierarchy
Severity
warning
Type
regex
Pattern
<h1[^>]className=["'][^"']text-base|<p[^>]className=["'][^"']text-4xl
Message
Text sizing doesn't follow logical hierarchy.
Fix Action
Use type scale: h1 (text-4xl), h2 (text-3xl), h3 (text-2xl), body (text-base)
Applies To
- *.tsx
- *.jsx
Missing Keyboard Focus Indicators
Id
missing-focus-visible
Severity
error
Type
regex
Pattern
- <(button|a|input|select|textarea)(?!.*focus:)
Message
Interactive element missing keyboard focus indicator.
Fix Action
Add focus styles (e.g., focus:ring-2 focus:ring-offset-2 focus:outline-none)
Applies To
- *.tsx
- *.jsx
Text Selection Disabled
Id
text-not-selectable
Severity
warning
Type
regex
Pattern
user-select:\snone|userSelect:\s["']none["']
Message
Text selection disabled unnecessarily.
Fix Action
Only disable text selection on UI controls, not content text
Applies To
- *.tsx
- *.jsx
- *.css