{"name":"tailwind-variants","version":"1.0.0","description":"🦄 Tailwindcss first-class variant API","author":{"name":"Junior Garcia","email":"jrgarciadev@gmail.com"},"license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/heroui-inc/tailwind-variants.git"},"bugs":{"url":"https://github.com/heroui-inc/tailwind-variants/issues"},"type":"module","main":"dist/index.cjs","types":"dist/index.d.ts","sideEffects":false,"scripts":{"dev":"tsup --watch","build":"tsup && node copy-types.cjs","typecheck":"tsc --noEmit","prepack":"clean-package","benchmark":"node benchmark.js","postpack":"clean-package restore","lint":"eslint . src/**/*.{js,ts}","lint:fix":"eslint --fix . src/**/*.{js,ts}","test":"jest --verbose","test:watch":"jest --watch --no-verbose"},"dependencies":{"tailwind-merge":"3.0.2"},"devDependencies":{"@commitlint/cli":"19.5.0","@commitlint/config-conventional":"19.5.0","@jest/globals":"29.7.0","@swc-node/jest":"1.8.12","@swc/cli":"0.5.0","@swc/core":"1.9.2","@swc/helpers":"0.5.15","@swc/jest":"0.2.37","@types/jest":"29.5.14","@types/node":"22.9.0","@typescript-eslint/eslint-plugin":"8.14.0","@typescript-eslint/parser":"8.14.0","benchmark":"2.1.4","class-variance-authority":"0.7.0","clean-package":"2.2.0","eslint":"8.57.0","eslint-config-prettier":"9.1.0","eslint-config-ts-lambdas":"1.2.3","eslint-import-resolver-typescript":"3.6.3","eslint-plugin-import":"2.31.0","eslint-plugin-jest":"28.9.0","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"5.2.1","eslint-plugin-promise":"7.1.0","expect":"29.7.0","jest":"29.7.0","postcss":"8.5.3","prettier":"3.3.3","prettier-eslint":"16.3.0","prettier-eslint-cli":"8.0.1","tailwindcss":"4.0.12","ts-node":"10.9.2","tsup":"8.3.5","typescript":"5.6.3"},"peerDependencies":{"tailwindcss":"*"},"keywords":["tailwindcss","classes","responsive","variants","styled","styles"],"engines":{"node":">=16.x","pnpm":">=7.x"},"module":"dist/index.js","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.js","types":"./dist/index.d.ts"},"./dist/*":"./dist/*","./package.json":"./package.json"},"_id":"tailwind-variants@1.0.0","gitHead":"00ec267d10d39844c53101f99dc392850a2ebc56","homepage":"https://github.com/heroui-inc/tailwind-variants#readme","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-2WSbv4ulEEyuBKomOunut65D8UZwxrHoRfYnxGcQNnHqlSCp2+B7Yz2W+yrNDrxRodOXtGD/1oCcKGNBnUqMqA==","shasum":"dde2cc2a8689910ca1cdc95ba82c63cf9094bd51","tarball":"http://registry-npm.ywwl.com/tailwind-variants/download/tailwind-variants-1.0.0.tgz","fileCount":11,"unpackedSize":30466,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEPxXtywCVavFg9CChv81iV7oUtYROfTNFmUiLrqjGhdAiBfB6oZ/n4rU5EOFjyvbrE7rUw6pxtND47zi8lR8Ru8Lg=="}],"size":9464,"noattachment":false,"key":"/tailwind-variants/-/tailwind-variants-1.0.0.tgz"},"_npmUser":{"name":"juniorgarciadev","email":"jrgarciadev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tailwind-variants_1.0.0_1741450761286_0.4367283325981821"},"_hasShrinkwrap":false,"readme":"<p align=\"center\">\n  <a href=\"https://tailwind-variants.org\">\n    <img width=\"20%\" src=\".github/assets/isotipo.png\" alt=\"tailwind-variants\" />\n    <h1 align=\"center\">tailwind-variants</h1>\n  </a>\n</p>\n<p align=\"center\">\n  The <em>power</em> of Tailwind combined with a <em>first-class</em> variant API.<br><br>\n  <a href=\"https://www.npmjs.com/package/tailwind-variants\">\n    <img src=\"https://img.shields.io/npm/dm/tailwind-variants.svg?style=flat-round\" alt=\"npm downloads\">\n  </a>\n  <a href=\"https://www.npmjs.com/package/tailwind-variants\">\n    <img alt=\"NPM Version\" src=\"https://badgen.net/npm/v/tailwind-variants\" />\n  </a>\n  <a href=\"https://github.com/heroui-inc/tailwind-variants/blob/main/LICENSE\">\n    <img src=\"https://img.shields.io/npm/l/tailwind-variants?style=flat\" alt=\"License\">\n  </a>\n</p>\n\n## Features\n\n- First-class variant API\n- Slots support\n- Composition support\n- Fully typed\n- Framework agnostic\n- Automatic conflict resolution\n- Tailwindcss V4 support\n\n## Documentation\n\nFor full documentation, visit [tailwind-variants.org](https://tailwind-variants.org)\n\n> ❕ Note: `Tailwindcss V4` no longer supports the `config.content.transform` so we remove the `responsive variants` feature\n>\n> If you want to use `responsive variants`, you need to add it manually to your classname.\n\n## Quick Start\n\n1. Installation:\n   To use Tailwind Variants in your project, you can install it as a dependency:\n\n```bash\nyarn add tailwind-variants\n# or\nnpm i tailwind-variants\n```\n\n2. Usage:\n\n```js\nimport {tv} from \"tailwind-variants\";\n\nconst button = tv({\n  base: \"font-medium bg-blue-500 text-white rounded-full active:opacity-80\",\n  variants: {\n    color: {\n      primary: \"bg-blue-500 text-white\",\n      secondary: \"bg-purple-500 text-white\",\n    },\n    size: {\n      sm: \"text-sm\",\n      md: \"text-base\",\n      lg: \"px-4 py-3 text-lg\",\n    },\n  },\n  compoundVariants: [\n    {\n      size: [\"sm\", \"md\"],\n      class: \"px-3 py-1\",\n    },\n  ],\n  defaultVariants: {\n    size: \"md\",\n    color: \"primary\",\n  },\n});\n\nreturn <button className={button({size: \"sm\", color: \"secondary\"})}>Click me</button>;\n```\n\n## Acknowledgements\n\n- [**cva**](https://github.com/joe-bell/cva) ([Joe Bell](https://github.com/joe-bell))\n  This project as started as an extension of Joe's work on `cva` – a great tool for generating variants for a single element with Tailwind CSS. Big shoutout to [Joe Bell](https://github.com/joe-bell) and [contributors](https://github.com/joe-bell/cva/graphs/contributors) you guys rock! 🤘 - we recommend to use `cva` if don't need any of the **Tailwind Variants** features listed [here](https://www.tailwind-variants.org/docs/comparison).\n\n- [**Stitches**](https://stitches.dev/) ([Modulz](https://modulz.app))  \n  The pioneers of the `variants` API movement. Inmense thanks to [Modulz](https://modulz.app) for their work on Stitches and the community around it. 🙏\n\n## Community\n\nWe're excited to see the community adopt HeroUI, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!\n\n- [Discord](https://discord.gg/9b6yyZKmH4)\n- [Twitter](https://twitter.com/getnextui)\n- [GitHub Discussions](https://github.com/heroui-inc/tailwind-variants/discussions)\n\n## Contributing\n\nContributions are always welcome!\n\nPlease follow our [contributing guidelines](./CONTRIBUTING.md).\n\nPlease adhere to this project's [CODE_OF_CONDUCT](./CODE_OF_CONDUCT.md).\n\n## Authors\n\n- Junior garcia ([@jrgarciadev](https://github.com/jrgaciadev))\n- Tianen Pang ([@tianenpang](https://github.com/tianenpang))\n\n## License\n\nLicensed under the MIT License.\n\nSee [LICENSE](./LICENSE.md) for more information.\n","publish_time":1741450761493,"maintainers":[{"name":"juniorgarciadev","email":"jrgarciadev@gmail.com"}],"_cnpm_publish_time":1741450761493,"dist-tags":{"dev":"0.0.17-dev.1","latest":"1.0.0"}}