prettier-plugin-tailwind-variants weekly downloads statistics
By tianenpang · npm · Prettier plugins
A Prettier plugin for Tailwind Variants that formats class arrays while preserving structure, then sorts them with prettier-plugin-tailwindcss
prettier-plugin-tailwind-variants has 7 recorded weekly downloads on npm, a decrease of 66.7% over the past 30 days, ranking #1983 of 2,256 tracked listings.
About prettier-plugin-tailwind-variants
prettier-plugin-tailwind-variants
A Prettier plugin for Tailwind Variants. Formats tv() class arrays while preserving structure, then sorts with prettier-plugin-tailwindcss.
Installation
Must be composed with prettier-plugin-tailwindcss as above.
Options
| Option | Default | Description |
| tvFunctions | ['tv'] | Callee names to format. Keep tailwindFunctions in sync for string sorting. | | tvUnwrapSingleClassArrays | true | Unwrap nested single-class arrays into the parent sort pool. Ignored when grouping or flattening. | | tvGroupByModifiers | false | Split tokens into one string per modifier group (base, hover, dark, …). | | tvModifierGroupOrder | built-in | Group id order when grouping is on. Ignored when grouping is off. | | tvFlattenToString | false | Flatten arrays / nests into a single class string. Ignored for final shape when grouping is on. | | tvRemoveEmptyClasses | true | Remove empty / whitespace-only class strings and empty arrays. | | tvGroupByBreakpoints | false | When grouping, put each breakpoint (sm, md, …) in its own group. Ignored when grouping is off. |
Shape priority: tvGroupByModifiers → else tvFlattenToString → else preserve structure (+ unwrap).
Formatting
Covers base, slots, variants, compoundVariants / compoundSlots (class / className). JS/TS and regions (Vue, Svelte, Astro, HTML, …); CSS is left alone. Framework parsers need their own Prettier plugins.
Editor IntelliSense
Prefer key-scoped classRegex over classFunctions: ["tv"] so conditions and defaultVariants are skipped. Copy from .vscode/settings.json and enable "editor.quickSuggestions": { "strings": "on" }.
Limitations
• Static strings and literal arrays only • Dynamic values skip that array • Peers: prettier@^3.0.0, prettier-plugin-tailwindcss@^0.8.0
Community
Contributing · Code of Conduct · Security · Support
License
MIT
Description from the npm listing.
- prettier
- prettier-plugin
- tailwind
- tailwindcss
- tailwind-variants
- formatting
- class-sorting
- variants
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (543)Similar npm Prettier plugins plugins
All 20 prettier-plugin-tailwind-variants alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/prettier-plugin-tailwind-variants. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.