tailwind-4

Standardize Tailwind 4 className composition and theming in React/TypeScript projects.

Updated Apr 9, 2025
One-click install
npx skills add https://github.com/D4nitrix13/dotfiles-tmp --skill tailwind-4-d4nitrix13
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-4
Source: https://github.com/D4nitrix13/dotfiles-tmp/tree/main/.config/opencode/skill/tailwind-4
Command: npx skills add https://github.com/D4nitrix13/dotfiles-tmp --skill tailwind-4-d4nitrix13

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Tailwind 4 guide standardizes patterns and rules to avoid common pitfalls and inconsistent styling in UI code.

Core Features & Use Cases

  • Pattern-driven styling decisions for className construction and responsive design.
  • Guidance on avoiding var() in className, hex colors, and other anti-patterns.
  • Practical examples of using cn() for conditional class merging and when to prefer style props.

Quick Start

Start by applying the Tailwind 4 patterns in your components and use the cn() helper for conditional class merging.

Frequently Asked Questions about tailwind-4

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

FAQPage Schema
What is the best way to manage conditional Tailwind classes in React?

Avoid using var() within className strings and raw hex colors to prevent inconsistent Tailwind styling. Authoritative Tailwind 4 patterns define safe theming practices and guide dynamic value usage to eliminate these anti-patterns.

How do I build responsive and dynamic styles with Tailwind 4?

You build responsive and dynamic styles with Tailwind 4 by following pattern-driven styling decisions for className construction. This approach provides practical rules for dynamic values and responsive design without relying on anti-patterns.

When should I use Tailwind style props instead of className?

You should use Tailwind style props instead of className when handling specific dynamic values that cannot be safely composed using the cn() helper. Tailwind 4 patterns define clear guidance on when to prefer style props over className strings.

Can I use Tailwind 4 patterns in modern TypeScript projects?

Yes, you can use Tailwind 4 patterns in modern TypeScript projects. The patterns are specifically applicable to UI components in React/TypeScript environments where you need standardized className composition and theming practices.