# heroui-inc/tailwind-variants

🦄 Tailwindcss first-class variant API

Repository: https://github.com/heroui-inc/tailwind-variants
Canonical: https://ross.abutalabs.com/products/tailwind-variants
Homepage: https://tailwind-variants.org
Language: TypeScript
License: MIT
License Family: permissive
Topics: classnames, css, tailwindcss, variants
Last push: 2026-08-18T08:31:58+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 96, longevity 94
- inputs: {"age_days": 1329, "days_push": 15, "days_rel": 30, "gap_med": 14, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3292, forks 88 (observed 2026-08-28T04:07:53.978249+00:00)

## What it is
Tailwind Variants is a TypeScript library providing a first-class variant API on top of Tailwind CSS, letting you define typed component recipes with base styles, variants, slots, compound rules, and defaults. It includes built-in Tailwind class conflict resolution, is framework-agnostic, and offers a lite build for smaller bundles.

## Use cases
- manage tailwind css variants for ui components
- build a typed design system with tailwind
- merge conflicting tailwind classes automatically
- style multi-part components with slots
- create compound variant styles in tailwind
- replace cva with a fully typed variant api

## When to choose
- you use Tailwind CSS and want Stitches-style variants with full TypeScript inference
- you need slots and compound variants for multi-part components
- you want built-in class conflict resolution without installing tailwind-merge separately
- you need a framework-agnostic styling utility that works with React, Vue, Svelte, or plain JS

## When to avoid
- you don't use Tailwind CSS for styling
- you need responsive variant generation with Tailwind v4, which no longer supports config transforms
- you want a full CSS-in-JS solution with runtime style objects rather than class strings
- bundle size is critical and you can't accept even the lite build's overhead

## Facets
- artifact type: library
- maturity: active
- function: ui-components, css-framework, state-management
- domain: frontend, web-development, web-design, developer-tools
- platform: browser, cross-platform
- tags: tailwindcss, variants, design-systems, class-merging, typescript, component-recipes, slots, framework-agnostic, nodejs, web-server

## Member repositories
- heroui-inc/tailwind-variants (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:53.978249+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-29T18:43:11.841683+00:00, confidence not recorded.
  - readme: https://github.com/heroui-inc/tailwind-variants (fetched 2026-08-28T04:07:53.978249+00:00, sha 3bc1d39f3fe2)
  - homepage: https://tailwind-variants.org (fetched 2026-08-29T09:36:00.111933+00:00, sha df8cb02bd11f)
  - site_page: https://www.tailwind-variants.org/docs/introduction (fetched 2026-08-29T09:36:00.121877+00:00, sha dfcb9cc82848)
  - site_page: https://www.tailwind-variants.org/docs/variants (fetched 2026-08-29T09:36:00.124226+00:00, sha 081116ae2cee)
  - registry_npm: https://registry.npmjs.org/tailwind-variants (fetched 2026-08-29T09:36:00.126184+00:00, sha 98613b412587)
- Data as of 2026-08-30T08:39:29.467469+00:00.
