design-mobile-first

Solid

Designs mobile-first responsive interfaces with touch optimization — breakpoint strategy, touch targets, safe areas, and gesture handling, enhanced progressively for larger screens. Use when the user mentions "mobile", "responsive", "touch", "PWA", "small screen", "tablet", "swipe", or "gesture", or when a UI looks desktop-only on a phone viewport.

Web & Frontend 6 stars 0 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
28
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Mobile-First Design Skill Build interfaces that work beautifully on mobile devices first, then enhance for larger screens. ## CRITICAL: Check Existing First **Before ANY mobile optimization, verify:** 1. **Check existing breakpoints:** ```bash cat tailwind.config.* | grep -A10 "screens\|breakpoints" rg "sm:|md:|lg:|xl:" --type tsx | head -20 ``` 2. **Check for existing mobile patterns:** ```bash rg "useMediaQuery|useBreakpoint|isMobile" --type ts --type tsx ls -la src/hooks/use*Mobile* src/hooks/use*Responsive* 2>/dev/null ``` 3. **Check viewport meta:** ```bash rg "viewport" src/app/layout.tsx index.html ``` **Why:** Maintain consistent responsive patterns across the app. ## Mobile-First Principles ### 1. Design for Mobile First ```css /* Base styles = mobile */ .card { padding: 1rem; font-size: 0.875rem; } /* Then enhance for larger screens */ @media (min-width: 640px) { .card { padding: 1.5rem; font-size: 1rem; } } /* Tailwind design-mobile-first */ <div className="p-4 sm:p-6 md:p-8"> <div className="text-sm sm:text-base lg:text-lg"> <div className="grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"> ``` ### 2. Touch Targets (44px minimum) ```tsx // Touch-friendly button <button className="min-h-[44px] min-w-[44px] px-4 py-3"> Tap me </button> // Touch-friendly list items <li className="py-3 px-4 min-h-[44px] active:bg-muted"> List item </li> // Icon buttons with proper touch area <button className="p-3 -m-3" // Negative margin extends touch area aria-lab...

Details

Author
kensaurus
Repository
kensaurus/cursor-kenji
Created
5 months ago
Last Updated
2 days ago
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category