What problem does it solve?
It solves inconsistent or broken Tailwind styling by enforcing safe class usage, avoiding invalid CSS constructs, and providing reliable guidance for dynamic and conditional styling.
Core Features & Use Cases
- Tailwind class safety guardrails: Prevents unsupported patterns such as using CSS variables like var() inside className and forbids hex colors in className.
- Deterministic class composition with cn(): Establishes when to use cn() for conditional classes and when not to wrap static classes.
- Correct handling of dynamic styling: Guides dynamic values to the style prop and uses CSS custom properties only where libraries require non-class styling (e.g., chart components).
Quick Start
Use the tailwind-4 skill when you need to write or refactor React components that use Tailwind classes (including cn() conditions, responsive states, and dynamic styling) to ensure they follow the rules and avoid var() and hex colors in className.