PluginBench
Skill
Pass
Audit score 90

tailwindcss-mobile-first

josiahsiegel/claude-plugin-marketplace

Mobile-first responsive design patterns with Tailwind CSS v4 breakpoints, container queries, and touch-safe layouts.

What is tailwindcss-mobile-first?

This skill provides mobile-first design guidance for Tailwind CSS, covering breakpoint strategy, fluid typography, responsive layouts, container queries, and safe-area handling. Use it when building responsive interfaces that prioritize mobile experience and need production-ready patterns for touch targets, notch handling, and performance.

  • Progressive enhancement from mobile baseline with sm:, md:, lg:, xl:, 2xl: breakpoints
  • Fluid typography and spacing using clamp() for smooth scaling between breakpoints
  • Container queries (@container) for component-level responsiveness independent of viewport
  • Touch-safe interactive elements with 44px targets, adequate spacing, and mobile navigation patterns
  • Safe-area inset handling for notched devices and fixed mobile UI
  • Hide/show utilities across breakpoints (hidden md:block) and max-* breakpoints for desktop-down overrides

How to install tailwindcss-mobile-first

npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill tailwindcss-mobile-first
Prerequisites
  • Tailwind CSS v4 installed and configured in your project
Claude Code
Cursor
Windsurf
Cline

How to use tailwindcss-mobile-first

  1. 1.Start with unprefixed Tailwind utilities for the mobile baseline design
  2. 2.Add breakpoint-prefixed utilities (sm:, md:, lg:, xl:, 2xl:) to progressively enhance for larger screens
  3. 3.Use fluid typography with clamp() for smooth scaling between breakpoints instead of fixed jumps
  4. 4.Ensure interactive elements meet 44px touch target minimums with adequate spacing
  5. 5.Apply container queries (@container) for components that need to respond to their own width
  6. 6.Use safe-area utilities for fixed UI elements on notched devices
  7. 7.Test hover states with focus and active states to ensure touch device compatibility
  8. 8.Reference the mobile-first-complete-guide.md for detailed patterns on layouts, navigation, images, and performance

Use cases

Good for
  • Building mobile-first web applications where the design starts from small screens and progressively enhances
  • Creating responsive typography that scales smoothly between breakpoints using fluid sizing
  • Implementing reusable components with container queries that adapt to their container width
  • Designing fixed bottom navigation that respects safe-area insets on notched devices
  • Handling touch interactions and hover states that work across both touch and pointer devices
Who it's for
  • Frontend developers building responsive web applications
  • UI/UX designers implementing mobile-first design systems
  • Teams using Tailwind CSS v4 (2025-2026) for production applications
  • Developers working on touch-first or mobile-primary products
  • Engineers optimizing for mobile performance and accessibility

tailwindcss-mobile-first FAQ

What's the difference between mobile-first and desktop-first in Tailwind?

Mobile-first means unprefixed utilities apply at all sizes (mobile baseline), then breakpoint prefixes (sm:, md:, etc.) add enhancements at larger screens. Desktop-first applies styles at all sizes and uses max-* to override on smaller screens. Mobile-first is Tailwind's default and recommended approach for better performance and maintainability.

When should I use container queries instead of breakpoints?

Use container queries (@container) for reusable components that must respond to their own container width rather than viewport width. This is especially useful for components used in different layout contexts. Use viewport breakpoints for page-level layout decisions.

How do I handle safe-area insets for notched devices?

Use Tailwind's safe-area utilities (safe-area-inset-top, safe-area-inset-bottom, etc.) on fixed elements like headers and bottom navigation. This ensures content doesn't overlap with notches, camera cutouts, or system UI on modern mobile devices.

Why do my hover interactions not work on touch devices?

Hover-only interactions fail on touch because touch devices don't have a hover state. Always pair hover with focus and active states, or provide explicit touch-friendly controls like buttons. Use @media (hover: hover) to detect hover capability.

How do I prevent layout shift when images and videos load?

Reserve dimensions using aspect-ratio utilities (aspect-video, aspect-square, etc.) before content loads. This prevents Cumulative Layout Shift and improves Core Web Vitals scores.

Full instructions (SKILL.md)

Source of truth, from josiahsiegel/claude-plugin-marketplace.


name: tailwindcss-mobile-first description: | Mobile-first responsive design patterns with Tailwind CSS v4 (2025-2026). PROACTIVELY activate for: (1) mobile-first design with Tailwind breakpoints (sm:, md:, lg:, xl:, 2xl:), (2) responsive utility ordering (default = mobile, then breakpoints), (3) responsive typography (text-base sm:text-lg lg:text-xl), (4) responsive grids and flexbox, (5) hide/show across breakpoints (hidden md:block), (6) max-* breakpoints for desktop-down overrides, (7) container queries (@container) for component-level responsiveness, (8) safe-area insets and notch handling, (9) landscape vs portrait orientation, (10) touch vs hover (hover: with @media). Provides: breakpoint reference, mobile-first patterns, container-query examples, safe-area recipes, and touch/hover handling.

Tailwind Mobile-First Skill

Use this skill for Tailwind CSS mobile-first responsive design: breakpoint strategy, fluid typography and spacing, touch targets, container queries, safe areas, responsive layouts, media, navigation, and mobile performance.

When to Use This Skill

Use when the user asks for tasks covered by the frontmatter triggers, especially implementation guidance, debugging, architecture choices, production hardening, or performance-sensitive decisions in this domain. Start from this orchestrator, then load the focused reference file that matches the requested detail level.

Core Workflow

  1. Start with unprefixed utilities for the mobile baseline, then progressively enhance with sm:, md:, lg:, xl:, and 2xl:.
  2. Choose breakpoints from content needs rather than device names; override Tailwind v4 theme breakpoints only when the design system requires it.
  3. Use fluid typography and spacing with clamp() for smoother scaling between breakpoints while preserving accessibility via rem + vw.
  4. Make interactive elements touch-safe with 44px recommended targets, adequate spacing, clear labels, and mobile navigation patterns.
  5. Use container queries for reusable components that must respond to their own width instead of viewport width.
  6. Reserve media dimensions with aspect-ratio utilities and use safe-area utilities for notched devices and fixed mobile UI.

Key Gotchas

  • Unprefixed Tailwind classes apply at every size; breakpoint-prefixed utilities apply at that breakpoint and above.
  • Ordering classes desktop-first does not make the design desktop-first, but it often obscures intent and increases bugs.
  • Hover-only interactions fail on touch devices; pair hover states with focus, active, or explicit controls.
  • Videos and images without reserved aspect ratios can cause Cumulative Layout Shift.
  • Fixed bottom navigation must account for safe-area insets and add content padding to avoid overlap.

Reference Map

  • references/mobile-first-complete-guide.md - Full original guide covering philosophy, breakpoints, fluid type/spacing, touch targets, container queries, layouts, responsive images/type, navigation, safe areas, mobile performance, testing, and responsive video patterns.

Response Guidance

  • Preserve the user's existing framework, library, and tooling choices unless there is a clear compatibility or performance reason to suggest an alternative.
  • Give copy-pasteable code only for the exact task at hand; otherwise point to the relevant reference section.
  • Call out tradeoffs, failure modes, and verification steps for production workflows.
  • Prefer accessible, maintainable, measurable solutions over clever micro-optimizations.