# tailwindlabs/prettier-plugin-tailwindcss

A Prettier plugin for Tailwind CSS that automatically sorts classes based on our recommended class order.

Repository: https://github.com/tailwindlabs/prettier-plugin-tailwindcss
Canonical: https://ross.abutalabs.com/products/prettier-plugin-tailwindcss
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-07-15T09:02:38+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 92, release rhythm 81, longevity 100
- inputs: {"age_days": 1833, "days_push": 49, "days_rel": 49, "gap_med": 32.5, "n_releases_24m": 15}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7130, forks 179 (observed 2026-08-28T04:09:56.109354+00:00)

## What it is
An official Prettier plugin from Tailwind Labs that automatically sorts Tailwind CSS utility classes according to the recommended class order. It works with Tailwind v3 and v4, sorting class attributes, framework equivalents like className, and @apply directives.

## Use cases
- sort tailwind css classes automatically
- enforce consistent tailwind class order in prettier
- format className attributes in react projects
- sort classes in @apply directives
- keep tailwind utility ordering consistent across a team

## When to choose
- you use Tailwind CSS v3 or v4 with Prettier v3+
- you want automatic, opinionated class sorting on save
- you work in frameworks like React, Vue, or Angular with class-based attributes

## When to avoid
- you don't use Tailwind CSS
- you use Prettier v2 or a CommonJS-only toolchain that can't load ESM plugins
- you prefer a different class ordering convention

## Facets
- artifact type: plugin
- maturity: active
- function: formatter, css-framework, developer-tools
- domain: frontend, web-development, developer-tools
- platform: cross-platform
- tags: prettier, tailwindcss, class-sorting, code-style, nodejs

## Member repositories
- tailwindlabs/prettier-plugin-tailwindcss (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:56.109354+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:40:03.787917+00:00, confidence not recorded.
  - readme: https://github.com/tailwindlabs/prettier-plugin-tailwindcss (fetched 2026-08-28T04:09:56.109354+00:00, sha 35b3149ef4e9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
