tailwind-4

Tailwind CSS 4.1+ patterns. Use when styling components, responsive design, container queries, masks, shadows, or animations. (project)

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 5, 2026

When & Why to Use This Skill

This Claude skill provides expert-level patterns and best practices for Tailwind CSS 4.1+, empowering developers to implement modern, high-performance styling workflows. It focuses on the transition to CSS-native configurations, the use of container queries for truly responsive components, and the application of advanced variants and masks to create high-quality, maintainable web interfaces.

Use Cases

  • Case 1: Modernizing CSS Architecture - Transitioning from legacy tailwind.config.js files to the new CSS-native @theme and @utility directives for a more streamlined build process.
  • Case 2: Component-Level Responsiveness - Implementing sophisticated layouts using native container queries (@container) to build components that adapt to their parent container size.
  • Case 3: Advanced State Styling - Leveraging the new in-* and has-* variants to style elements based on parent or sibling states without requiring complex JavaScript logic.
  • Case 4: High-Performance UI Effects - Creating polished user experiences with entry animations using the starting: variant and advanced visual effects like radial masks and semantic dark mode tokens.
nametailwind-4
descriptionTailwind CSS 4.1+ patterns. Use when styling components, responsive design, container queries, masks, shadows, or animations. (project)

Tailwind 4.1+

Setup

@import "tailwindcss";

Required Reading

Before writing any @theme or @utility → READ utilities.md and examples/*.css

Avoid → Use

  • tailwind.config.js → @theme in CSS
  • @apply → @utility or raw CSS
  • dark:bg-* per element → semantic tokens (see patterns.md)
  • group class → in-* variant (see variants.md)

Patterns

  • Dark mode: :root/.dark + @theme inline → patterns.md
  • Variants: in-*, has-*, nth-*, negation → variants.md
  • Container queries: @container, @sm:, @md: → variants.md
  • Entry animation: starting: variant → patterns.md
  • Masks: mask-b-from-*, mask-radial-* → patterns.md