class-variance-authority
0.7.1 · 26 Nov 2024Apache-2.087.5M / weekRepositoryHomepagenpmAtom feed
Your version
0.7.1 is the newest release of 0.6.x.
In short
2 changed
Release note
What's Changed
cx→clsxcvanow usesclsxunder-the-hood to concatenate classes with no breaking changes to the current experience and no increase to bundle-size.The existing
cxexport still exists, but as an alias ofclsxBringing additional benefits of:
Provides additional support for booleans and variadic strings within
classorclassNamepropsconst button = cva([true && "button-base", false && "not-rendered"]); // => 'button-base' const buttonConsumer = button({ class: [true && "extra-class"] }); // => 'button-base extra-class'Provides support for object syntax within
classorclassNamepropsconst button = cva({ foo: true, bar: false }); // => 'foo baz'
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.