What problem does it solve?
Provides a concise decision framework and best practices to remove inconsistent Tailwind usage, prevent var() and hex color usage inside class names, and standardize conditional class merging in component codebases. It reduces styling bugs, unpredictable theme behavior, and fragile class conflicts by promoting semantic Tailwind tokens and clear rules for dynamic or library-driven styling.
Core Features & Use Cases
- Styling decision tree that guides whether to use static className, conditional merging, or inline styles for dynamic values.
- Clear prohibition of var() and hex values inside class names and recommendation to use theme classes instead, improving theming and design system consistency.
- Guidance on using a cn-style utility for conditional and conflicting class merging, and fallback patterns for libraries that don't accept class names by using style constants.
- Real-world use: audit React components to replace non-semantic color usages, apply responsive and dark-mode patterns, and centralize chart/library color constants.
Quick Start
Audit a component and replace any className uses of var() or hex colors with semantic Tailwind theme classes, and convert conditional strings into a cn-style merged expression where appropriate.