{"name":"tailwind-variants","version":"0.3.1","keywords":["tailwindcss","classes","responsive","variants","styled","styles"],"author":{"name":"Junior Garcia","email":"jrgarciadev@gmail.com"},"license":"MIT","_id":"tailwind-variants@0.3.1","homepage":"https://github.com/heroui-inc/tailwind-variants#readme","bugs":{"url":"https://github.com/heroui-inc/tailwind-variants/issues"},"dist":{"shasum":"3ea13bd90b4086b41f8aef7ba8ee63597f95f86f","tarball":"http://registry-npm.ywwl.com/tailwind-variants/download/tailwind-variants-0.3.1.tgz","fileCount":21,"integrity":"sha512-krn67M3FpPwElg4FsZrOQd0U26o7UDH/QOkK8RNaiCCrr052f6YJPBUfNKnPo/s/xRzNPtv1Mldlxsg8Tb46BQ==","signatures":[{"sig":"MEYCIQDRAasZNuMdIny9iWAiudKMI5b5uTv80Y+eN7f6Nm4p6gIhAL2+H5vGjNjqJoQYnJ6CgOXPk88CvrBMq6/l5YNz7WjQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42732,"size":12766,"noattachment":false,"key":"/tailwind-variants/-/tailwind-variants-0.3.1.tgz"},"main":"dist/index.cjs","tsup":{"clean":true,"entry":["src/*.js"],"format":["cjs","esm"],"minify":true,"target":"es2019","treeshake":true},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=16.x","pnpm":">=7.x"},"gitHead":"f363575fa1d2366f11ddfff02b1c87a6d25a472e","scripts":{"lint":"eslint . src/**/*.{js,ts}","test":"jest --verbose","build":"tsup && node copy-types.cjs","prepack":"clean-package","lint:fix":"eslint --fix . src/**/*.{js,ts}","postpack":"clean-package restore","benchmark":"node benchmark.js","typecheck":"tsc --noEmit","test:watch":"jest --watch --no-verbose"},"_npmUser":{"name":"juniorgarciadev","email":"jrgarciadev@gmail.com"},"repository":{"url":"git+https://github.com/heroui-inc/tailwind-variants.git","type":"git"},"_npmVersion":"10.7.0","description":"🦄 Tailwindcss first-class variant API","directories":{},"sideEffects":false,"_nodeVersion":"20.14.0","dependencies":{"tailwind-merge":"2.5.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.12.3","devDependencies":{"jest":"29.7.0","tsup":"8.3.5","eslint":"8.57.0","expect":"29.7.0","ts-node":"10.9.2","@swc/cli":"0.5.0","prettier":"3.3.3","@swc/core":"1.9.2","@swc/jest":"0.2.37","benchmark":"2.1.4","typescript":"5.6.3","@types/jest":"29.5.14","@types/node":"22.9.0","tailwindcss":"3.4.14","@swc/helpers":"0.5.15","@jest/globals":"29.7.0","clean-package":"2.2.0","@swc-node/jest":"1.8.12","@commitlint/cli":"19.5.0","prettier-eslint":"16.3.0","eslint-plugin-jest":"28.9.0","eslint-plugin-node":"11.1.0","prettier-eslint-cli":"8.0.1","eslint-plugin-import":"2.31.0","eslint-plugin-promise":"7.1.0","eslint-config-prettier":"9.1.0","eslint-plugin-prettier":"5.2.1","class-variance-authority":"0.7.0","eslint-config-ts-lambdas":"1.2.3","@typescript-eslint/parser":"8.14.0","@commitlint/config-conventional":"19.5.0","@typescript-eslint/eslint-plugin":"8.14.0","eslint-import-resolver-typescript":"3.6.3"},"peerDependencies":{"tailwindcss":"*"},"_npmOperationalInternal":{"tmp":"tmp/tailwind-variants_0.3.1_1737232079020_0.3697008251427514","host":"s3://npm-registry-packages-npm-production"},"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":1737232079252,"maintainers":[{"name":"juniorgarciadev","email":"jrgarciadev@gmail.com"}],"_cnpm_publish_time":1737232079252,"dist-tags":{"dev":"0.0.17-dev.1","latest":"1.0.0"}}