tailwind-css-patterns

Implements responsive Tailwind CSS utility patterns for component styling and layout design.

3|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/firstsun-dev/skills --skill tailwind-css-patterns-firstsun-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tailwind-css-patterns
Source: https://github.com/firstsun-dev/skills/tree/main/plugins/frontend-product-design/skills/tailwind-css-patterns
Command: npx skills add https://github.com/firstsun-dev/skills --skill tailwind-css-patterns-firstsun-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Styling modern web interfaces with Tailwind CSS requires knowing hundreds of utility classes, responsive breakpoint conventions, dark mode configuration, and v4.1 CSS-first configuration patterns, which slows down developers building React, Vue, or Svelte components. ## Core Features & Use Cases - Responsive Layout Patterns: Mobile-first grid, flexbox, spacing, and typography utilities with breakpoint prefixes from sm to 2xl. - Component Recipes: Ready-to-use patterns for cards, navigation bars, forms, modals, and React components with variant props. - Dark Mode & Accessibility: Class-based dark mode toggles, focus management, ARIA patterns, color contrast guidance, and reduced-motion support. - Use Case: When building a product card in React that must stack vertically on mobile and sit side-by-side on desktop with dark mode support, the Skill provides the exact utility class composition and responsive prefixes to apply. ## Quick Start Ask the agent to style a responsive card component with Tailwind CSS including dark mode support and mobile-first breakpoints.

Frequently Asked Questions about tailwind-css-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build responsive layouts with Tailwind CSS?▼

Tailwind uses mobile-first breakpoint prefixes like sm:, md:, and lg: applied before utilities, such as grid grid-cols-1 md:grid-cols-3. Write base styles for mobile first, then add prefixed utilities for larger screens, testing each breakpoint in browser DevTools.

How to add dark mode to a Tailwind CSS project?▼

Configure darkMode: 'class' or 'media' in your Tailwind config, then use the dark: variant prefix like dark:bg-gray-900. For class strategy, toggle the dark class on the html element with document.documentElement.classList.toggle('dark').

Does Tailwind CSS v4 support CSS-first configuration?▼

Yes, Tailwind v4.1 supports CSS-first configuration using the @theme directive in your stylesheet instead of a JavaScript config file. You can define custom colors, fonts, spacing, breakpoints, and animations directly in CSS alongside @import "tailwindcss".

Why are my Tailwind classes not applying in production?▼

Classes are usually purged because content paths in the config do not include all template files. Verify the content array covers your source files, rebuild the CSS, and safelist any dynamically generated class names.

When should I use @apply versus utility classes in Tailwind?▼

Prefer composing utility classes directly in markup for maintainability, as the Skill recommends. Reserve @apply for extracting repeated patterns into component classes, since overuse of @apply with complex selectors causes specificity issues.