What problem does it solve?
This Skill provides clear guidelines and best practices for using Tailwind CSS, ensuring consistent, maintainable, and efficient styling across your projects. It helps avoid common pitfalls and promotes optimal usage of utility classes and theming.
Core Features & Use Cases
- Styling Decision Tree: Guides you on choosing the right approach for different styling needs (utility classes,
style prop, cn() utility).
- Critical Rules: Enforces best practices like avoiding
var() in className and using semantic Tailwind color classes instead of hex codes.
cn() Utility Usage: Demonstrates when and how to effectively use the cn() utility for conditional and merged class names.
- Dynamic Values & Theming: Shows how to handle dynamic values and integrate with CSS custom properties for theming.
- Common Patterns: Provides examples for Flexbox, Grid, Spacing, Typography, Borders, Shadows, States, Responsive design, and Dark Mode.
- Arbitrary Values: Explains the correct use of arbitrary values as an escape hatch.
Quick Start
Use the tailwind-4 skill to understand how to apply dynamic width to an element using the style prop.