tailwind-patterns

Implements Tailwind CSS v4 styling with CSS-first configuration, container queries, and design tokens.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/Eng-suso/BK-GPT --skill tailwind-patterns-eng-suso
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tailwind-patterns
Source: https://github.com/Eng-suso/BK-GPT/tree/main/.claude/skills/tailwind-patterns
Command: npx skills add https://github.com/Eng-suso/BK-GPT --skill tailwind-patterns-eng-suso

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend developers migrating to or building with Tailwind CSS v4 need guidance on its CSS-first architecture, since v4 replaces the JavaScript config file with the @theme directive and introduces native container queries, OKLCH colors, and the Oxide engine. ## Core Features & Use Cases - CSS-First Configuration: Define design tokens with the @theme directive using semantic naming for colors, spacing, and typography instead of tailwind.config.js. - Modern Responsive Patterns: Apply container queries (@container, @sm:, @md:) for component-level responsiveness alongside mobile-first viewport breakpoints. - Layout & Design Systems: Implement Flexbox and Grid patterns including Bento layouts, dark mode strategies, OKLCH color tokens, and component extraction rules. - Use Case: When building a reusable card component that must adapt to its parent width rather than the viewport, use this Skill to apply named container queries and semantic design tokens correctly. ## Quick Start Use the tailwind-patterns skill to refactor this component to Tailwind v4 with CSS-first theme tokens and container queries.

Frequently Asked Questions about tailwind-patterns

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

FAQPage Schema
How do I configure Tailwind CSS v4 without tailwind.config.js?▼

Tailwind v4 uses CSS-first configuration through the @theme directive in your stylesheet. Define tokens like --color-primary, --spacing-md, and --font-sans directly in CSS, and they become available as utility classes automatically.

How do container queries work in Tailwind CSS v4?▼

Add @container to a parent element, then use container breakpoints like @sm:, @md:, or @lg: on children. Named containers such as @container/card allow targeting specific contexts, making components responsive to their parent rather than the viewport.

What is the difference between Tailwind v3 and v4?▼

Tailwind v4 replaces tailwind.config.js with CSS-based @theme configuration, uses the Rust-based Oxide engine for faster builds, and supports native CSS nesting and container queries. JIT mode is always on, and heavy @apply usage is discouraged.

Does Tailwind v4 support dark mode with a custom selector?▼

Yes, Tailwind v4 supports class-based dark mode toggled with a .dark class, media-based mode following system preference, and a custom selector strategy for complex theming. Apply variants like dark:bg-zinc-900 and dark:text-zinc-100 to elements.

When should I extract components instead of repeating Tailwind classes?▼

Extract a component when the same class combination appears three or more times, when complex state variants are involved, or when the element is part of a design system. Prefer React or Vue components over @apply for dynamic behavior.