Packages

class-variance-authority

0.7.1 · 26 Nov 2024Apache-2.087.5M / weekRepositoryHomepagenpmAtom feed

Your version

0.1.0

13 Feb 2022Where it was published

0.7.1 is the newest release of 0.1.x.

Release note

Adds support for boolean variants (huge thanks to @mariusflorescu) 🚀

const button = cva(["text-white", "bg-blue-700"], {
  variants: {
    disabled: {
      true: "opacity-50",
      false: "opacity-100",
    },
  },
});

button({ disabled: true });

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.