1. tailwind-merge
Merge Tailwind CSS classes without style conflicts
tailwind-merge
Package: tailwind-merge
Created by: dcastil
Last modified: Fri, 19 Apr 2024 11:19:42 GMT
Version: 2.3.0
License: MIT
Downloads: 8,797,661
Repository: https://github.com/dcastil/tailwind-merge

Install

npm install tailwind-merge
yarn add tailwind-merge

tailwind-merge

Utility function to efficiently merge Tailwind CSS classes in JS without style conflicts.

 import { twMerge } from 'tailwind-merge'

twMerge('px-2 py-1 bg-red hover:bg-dark-red', 'p-3 bg-[#B91C1C]')
// → 'hover:bg-dark-red p-3 bg-[#B91C1C]'

Get started

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin