tailwind-patterns

Standardize Tailwind CSS v4 usage with @theme tokens and container queries.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/nishchaydev/emitra --skill tailwind-patterns-nishchaydev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-patterns
Source: https://github.com/nishchaydev/emitra/tree/main/.agent/skills/tailwind-patterns
Command: npx skills add https://github.com/nishchaydev/emitra --skill tailwind-patterns-nishchaydev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces inconsistent styling and slow UI iteration by guiding you to apply Tailwind CSS v4 in a CSS-first, token-driven, and responsive way that works well with modern features like container queries and native theming.

Core Features & Use Cases

  • CSS-first configuration: Use the v4 @theme approach with semantic design tokens for reliable, maintainable styling.
  • Container-query responsive components: Design components that respond to their parent width instead of only viewport breakpoints.
  • Modern layout and visual system patterns: Apply flex/grid, OKLCH-based color token architecture, typography scales, and dark-mode strategies consistently.
  • Maintainable component extraction and anti-pattern avoidance: Extract repeated class combinations and avoid excessive @apply, arbitrary values, !important, and v3/v4 mixing.
  • Performance principles: Follow v4-friendly practices like avoiding dynamic class generation and leveraging the faster Oxide engine.

Quick Start

Use this skill to rewrite an existing Tailwind codebase so that colors use semantic @theme tokens, responsiveness relies on container queries for components, and dark mode follows a consistent strategy.

Frequently Asked Questions about tailwind-patterns

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

FAQPage Schema
How do I configure semantic design tokens in Tailwind CSS v4?

Tailwind CSS v4 configures semantic design tokens using the CSS-first `@theme` approach, replacing JavaScript configuration files to establish reliable color and typography architecture. This method defines tokens directly in CSS for maintainable component theming.

How do container queries work for responsive layouts in Tailwind v4?

Container queries in Tailwind v4 enable responsive components to adapt based on their parent container width rather than the viewport breakpoint. This approach ensures UI components render correctly regardless of where they are placed in the layout.

What is the best way to structure OKLCH color tokens for dark mode in Tailwind?

The best way to structure OKLCH color tokens for dark mode is defining semantic `@theme` tokens that map to consistent visual system patterns. This strategy maintains predictable color shifts across light and dark themes without arbitrary values.

Can I use Tailwind v3 syntax and @apply heavily in Next.js projects?

Mixing Tailwind v3 syntax and using heavy `@apply` in Next.js projects causes styling drift and inefficient layout patterns. Maintainable component extraction requires avoiding v3/v4 mixing and arbitrary values to ensure clean CSS-first styling.

Why does dynamic class generation break Tailwind v4 performance?

Dynamic class generation breaks Tailwind v4 performance because it prevents the faster Oxide engine from statically analyzing and tree-shaking styles. Avoiding dynamic classes ensures reliable CSS extraction and optimal build performance.