tailwind-4
CommunityMaster Tailwind 4 patterns and best practices.
AuthorAlbarracin-sg
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Tailwind CSS usage is often inconsistent, forcing teams to reinvent patterns or fight with fragile className logic. This guide consolidates Tailwind 4 patterns and best practices to standardize styling decisions and reduce cognitive load.
Core Features & Use Cases
- Styling Decision Tree: Thumb rules for when to use Tailwind classes, dynamic values, and conditional styling to keep code readable and maintainable.
- Critical Rules: Enforces no var() in className and no hex colors, advocating semantic Tailwind tokens instead.
- The cn() Utility: Promotes using a small helper to safely compose conditional classes.
- Dynamic Values: Guidance on when to use style props or CSS variables for truly dynamic styling.
- Common Patterns: Layout, typography, spacing, borders/shadows, and responsive design patterns with Tailwind utilities.
- Arbitrary Values (Escape Hatch): How to opt into one-off values while avoiding design-system deviations.
Quick Start
Start by adopting the cn() utility for conditional styling and replace direct hex colors with semantic Tailwind tokens, then progressively apply responsive and dark mode patterns across components.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: tailwind-4 Download link: https://github.com/Albarracin-sg/MIS-DOTFILES/archive/main.zip#tailwind-4 Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.