tailwind-classes
A tiny utility for construction condditional CSS classes, with tailwind group variants and merging of identical classes.
import { taiwind } from "tailwind-classes";
tailwind(
"text-sm font-medium hover:(underline font-bold) 2xl:hover(text-sky-500)"
);
tailwind(true && "opacity-0 invisible hover:(opacity-100 visible)", {
"block min-h-0": true,
"foo bar": false
});
Features
- Supports Tailwind v3.0 up to v3.3
- Works in all modern browsers and Node >=16
- Fully typed
- Framework agnostic
Get Started
(Under construction)