# dcastil/tailwind-merge

Merge Tailwind CSS classes without style conflicts

Repository: https://github.com/dcastil/tailwind-merge
Canonical: https://ross.abutalabs.com/products/tailwind-merge
Homepage: https://npmjs.com/package/tailwind-merge
Language: TypeScript
License: MIT
License Family: permissive
Topics: tailwindcss, css, utility-classes
Last push: 2026-08-26T13:40:51+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 83, longevity 100
- inputs: {"age_days": 1875, "days_push": 7, "days_rel": 115, "gap_med": 29, "n_releases_24m": 16}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5678, forks 101 (observed 2026-08-28T04:09:27.780018+00:00)

## What it is
A TypeScript utility function that merges Tailwind CSS class strings while resolving style conflicts, keeping the last conflicting class. It supports Tailwind v4 and works in browsers and Node.js.

## Use cases
- merge tailwind css classes without conflicts
- resolve conflicting tailwind utility classes in react components
- combine conditional tailwind class names
- override tailwind styles passed via props
- deduplicate tailwind classes in a design system

## When to choose
- you build component libraries or UI kits with Tailwind and need class overrides to work predictably
- you merge dynamic Tailwind class strings in JS/TS and want conflict resolution
- you use Tailwind v4 and want a small, fully typed, well-maintained utility

## When to avoid
- you don't use Tailwind CSS — it only understands Tailwind's class syntax
- you use Tailwind v3, where you need the older v2.6.0 release
- you only need simple class name concatenation without conflict handling

## Facets
- artifact type: library
- maturity: stable
- function: css-framework, ui-components, serialization
- domain: frontend, web-development, web-design
- platform: browser, cross-platform
- tags: tailwindcss, utility-classes, class-merging, typescript, style-conflicts, nodejs

## Member repositories
- dcastil/tailwind-merge (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:27.780018+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:54:15.816518+00:00, confidence not recorded.
  - readme: https://github.com/dcastil/tailwind-merge (fetched 2026-08-28T04:09:27.780018+00:00, sha 4a5eca1d44d3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
