dcastil/tailwind-merge

Merge Tailwind CSS classes without style conflicts

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 51 minutes ago
Added to GitGenius on September 11th, 2026
Created on July 15th, 2021
Open Issues & Pull Requests: 27 (+0)
GitHub issues: Enabled
Number of forks: 104
Total Stargazers: 5,687 (+0)
Total Subscribers: 12 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 29.2 hours
Mean response time: 35.4 days
90th percentile: 110.5 days
Tracked items: 116

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 6% of issues opened in the past year have been closed. Three people close 76% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 19
New in 7 days: 1
Closed in 7 days: 1
Avg open age: 710 days
Stale 30+ days: 17
Stale 90+ days: 17

Recent activity

Opened in 7 days: 1
Closed in 7 days: 1
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • feature (57)
  • context-v3 (51)
  • context-v2 (37)
  • context-v1 (20)
  • context-v0 (13)
  • bug (11)
  • breaking (10)
  • documentation (3)

Detailed Description

tailwind-merge is a utility function that merges Tailwind CSS classes in JavaScript without style conflicts.

When building components that accept Tailwind classes as props, developers often face the problem of conflicting utility classes—for example, passing both `px-2` and `px-4` to a component that already applies `px-2`. The tool solves this by understanding Tailwind's class hierarchy and removing conflicting classes, keeping only the ones that should apply. It works by parsing class strings and intelligently determining which classes override others based on Tailwind's specificity rules.

The tool suits projects where components need to merge user-provided Tailwind classes with default styles, particularly in component libraries and design systems. It works across all modern browsers and maintained Node versions with full TypeScript support. Developers building reusable components that accept className props will find this most valuable, as it eliminates the manual work of managing class conflicts and ensures predictable styling behavior.

The project maintains active development with regular updates to support new Tailwind versions. The codebase is well-documented with comprehensive guides covering use cases, configuration, and plugin authoring. The tool includes a test suite that validates its conflict resolution logic across various class combinations. Documentation is thorough enough to guide both basic usage and advanced customization through plugins.