CodeBrowser / npm / clsx
clsx@2.1.1
// A tiny (239B) utility for constructing className strings conditionally.
$ npm install clsx
downloads/wk
103,409,803
license
MIT
version
2.1.1
published
Apr 23, 2024
What is clsx?
clsx is a lightweight utility that helps you build CSS class names dynamically by combining multiple classes based on conditions. Developers use it to avoid messy string concatenation and ternary operators when applying classes conditionally, making component styling logic cleaner and more readable.
Keywords
#classes #classname #classnames
Maintainers
lukeed