classix
Installation
npm install classix
Usage
import cx from "classix";
import { cx } from "classix";
cx("class1", "class2");
cx("class1 class2", "class3", "class4 class5");
cx("class1", true && "class2");
cx(false && "class1", "class2");
cx(true ? "class1" : "class2");
cx("class1", false ? "class2" : "class3");
cx(
"flex",
isPrimary ? "bg-primary-100" : "bg-secondary-100",
isLarge ? "m-4 p-4" : "m-2 py-2"
);
Highlights
- Fast
- Under 1 kB minified & gzipped
- Typed with TypeScript
- Fully tested
- Zero dependencies
- Follows semantic versioning
Changelog
For a list of changes and releases, see the changelog.
Contributing
Found a bug, have a question or looking to improve classix? Open an issue, start a discussion or submit a PR!