tailwind-4

Enforce Tailwind CSS styling patterns with the cn() utility and semantic classes.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/fwdarth/agent-teams-lite-domainaware --skill tailwind-4-fwdarth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-4
Source: https://github.com/fwdarth/agent-teams-lite-domainaware/tree/main/.opencode/skills/tailwind-4
Command: npx skills add https://github.com/fwdarth/agent-teams-lite-domainaware --skill tailwind-4-fwdarth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers avoid common pitfalls and enforce best practices when using Tailwind CSS, leading to more maintainable and efficient styling.

Core Features & Use Cases

  • Styling Decision Tree: Guides you on when to use Tailwind classes, style props, or the cn() utility.
  • Critical Rules Enforcement: Prevents the misuse of var() in class names and discourages hex colors in favor of Tailwind's semantic classes.
  • cn() Utility Usage: Demonstrates effective patterns for conditional styling and class merging.
  • Use Case: Ensure your team consistently applies Tailwind's theming and responsive design principles, preventing style inconsistencies across the application.

Quick Start

Use the tailwind-4 skill to apply a flexbox layout with items centered and space between.

Frequently Asked Questions about tailwind-4

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

FAQPage Schema
How do I conditionally merge Tailwind CSS classes in React?

To conditionally merge Tailwind CSS classes, use the `cn()` utility to combine class names and resolve conflicts. It provides effective patterns for conditional styling and ensures proper class merging across your components.

Can I use CSS custom properties with Tailwind utility classes?

You should avoid using `var()` directly inside Tailwind utility classNames. For library integrations requiring CSS custom properties, apply them via style props instead of class attributes to maintain proper styling logic.

Why should I use semantic Tailwind classes instead of hex colors?

Using semantic Tailwind classes instead of hex colors enforces theming consistency and prevents style inconsistencies. This approach maintains cleaner code and ensures your application adheres to Tailwind's responsive design principles.

What is the best way to handle dynamic styling and arbitrary values in Tailwind CSS?

The best way to handle dynamic styling and arbitrary values in Tailwind CSS is to follow a styling decision tree. It guides you on when to use utility classes, style props, or the `cn()` utility for maintainable code.

Does this approach work for enforcing responsive design patterns across a team?

Yes, applying these Tailwind CSS best practices ensures your team consistently applies theming and responsive design principles. It prevents style inconsistencies and guides proper responsive design implementation across the application.