A utility function built on top of tailwind-merge and clsx to help you merge and override tailwind classes in the same category Support string, object, array, and conditional syntax Installation npm install tailwind-cn tailwind-merge clsx Usage The API is exactly the same as clsx import { cn...
clsx-for-tailwindis a lightweight utility function for merging Tailwind CSS classes with conditional class names. It combines the power ofclsxandtailwind-mergeto provide an easy way to manage your CSS class names in a dynamic and maintainable way. ...
It is used internally withintwMergeand a direct subset ofclsx. If you useclsxorclassnamesto apply Tailwind classes conditionally and don't need support for object arguments, you can usetwJoininstead, it is a little faster and will save you a few hundred bytes in bundle size. ...
tailwind-merge has some features that simplify composing class strings together. Those allow you to compose classes like inclsx,classnamesorclassix. twMerge('some-class','another-class yet-another-class','so-many-classes')// → 'some-class another-class yet-another-class so-many-classes' ...
您可以使用class:list语法文档
17-[`classnames-order`](docs/rules/classnames-order.md): order classnames for consistency and it makes merge conflict a bit easier to resolve 18-[`enforces-negative-arbitrary-values`](docs/rules/enforces-negative-arbitrary-values.md): make sure to use negative arbitrary values classname withou...
Modifying inputs and output oftwMerge How do I maketwMergeaccept the same argument types as clsx/classnames? You can wraptwMergein another function which can modify the inputs and/or output. functioncustomTwMerge(...inputs){constmodifiedInputs=modifyInputs(inputs)returntwMerge(modifiedInputs...
return twMerge(clsx(inputs)); } 43 changes: 43 additions & 0 deletions 43 tailwind.config.js Original file line numberDiff line numberDiff line change @@ -0,0 +1,43 @@ /** @type {import('tailwindcss').Config} */ import colors from "tailwindcss/colors"; import defaultTheme from ...
Utility function to effectively merge tailwindcss in a readable format. Latest version: 0.0.1, last published: a year ago. Start using super-tailwind-merge in your project by running `npm i super-tailwind-merge`. There are no other projects in the npm re
PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc ...