prettier-plugin-tailwindcss
A Prettier plugin for Tailwind CSS that automatically sorts classes based on our recommended class order. (by tailwindlabs)
eslint-plugin-tailwindcss
ESLint plugin for Tailwind CSS usage (by francoismassart)
prettier-plugin-tailwindcss | eslint-plugin-tailwindcss | |
---|---|---|
22 | 13 | |
6,630 | 1,955 | |
3.0% | 3.2% | |
8.0 | 5.2 | |
3 days ago | 7 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
prettier-plugin-tailwindcss
Posts with mentions or reviews of prettier-plugin-tailwindcss.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2025-07-25.
-
Vanilla JavaScript Support for Tailwind Plus โ Tailwind CSS
You can use the Tailwind Prettier plugin to automate this: https://github.com/tailwindlabs/prettier-plugin-tailwindcss. I'm not sure if it would support the precise grouping and sorting you prefer, but it may be worth it anyway!
-
Should you stop using prettier? Maybe
For years, I've been prettier's biggest fan... Introducing it to every codebase at a new role, instantly adding it to any new repository, installing additional plugins such as tailwind or xml and of course, ensuring the "Format on save" option is switched on.
-
Build a Real-Time Voting System with Strapi & Instant DB: Part 2
prettier-plugin-tailwindcss: A plugin for Prettier that sorts your Tailwind CSS classes. It organizes Tailwind utility classes in a specific order to maintain consistency across the project.
- Dicas para escrever Tailwind CSS de forma limpa
-
I made a Prettier plugin that sorts your Tailwind classes... randomly!
Thats it! Still have problems? Check out the official prettier-plugin-tailwindcss documentation.
-
How to Setup Tailwind CSS Automatic Class Sorting with Prettier in New and Existing Projects
For additional configuration options like sorting classes in non-standard attributes, visit the prettier-plugin-tailwindcss documentation.
-
Multipage Vite Vanilla JavaScript
To automatically sort TailwindCSS classes when using Prettier, you can follow this documentation.
-
Tailwind CSS for frontend teams: From settings to rules
Since this was a problem that many people had already encountered, there was already a solution. The first thing I found was Tailwind's official Prettier plugin, which ensures that class names are always ordered according to a certain rule. Best of all, it's auto-correcting, so I don't accidentally miss something or commit a different order.
-
Use TailwindCSS prefixes for shared design system components
It's not as if the correct order for the rules is mysterious. It's implemented in the Tailwind compiler. Tools like prettier-plugin-tailwindcss, which automatically sorts the class names in your HTML code to match the order in which Tailwind generates them in your CSS output, use a public API in Tailwind to get this order.
-
Tailwind CSS Tips and Tricks Worth Knowing
Other than that, you can get Prettier sorting your classes with the Tailwind Prettier plugin. And one more quality-of-life extension that might help your eye sores from a long list of classes is Tailwind Fold.
eslint-plugin-tailwindcss
Posts with mentions or reviews of eslint-plugin-tailwindcss.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2025-01-12.
-
Just use this Next.js Eslint Configuration
Tailwind
-
Tailwind CSS for frontend teams: From settings to rules
However, after a little more searching, we found this plugin, which is maintained by the community and has slightly more rules than the official plugin's class name ordering rules. Again, most of the rules support auto-correction. Here are the rules the team chose to use
-
Recommended Linters
eslint-plugin-tailwindcss - Rules enforcing best practices and consistency using Tailwind CSS.
-
Has anyone figured out how to apply the eslint tailwindcss plugin to blade files?
I'm talking about this plugin: https://github.com/francoismassart/eslint-plugin-tailwindcss that helps with ordering your classnames correctly and adds a bunch of other useful checks.
-
Downsides to using computed properties as CSS to form classes?
For one, you can't take advantage of classnames order.
- Typescript + tailwind = typewind (first impressions)
- what is your favorite way/framework to write CSS
-
Just update my Next.js Boilerplate to Next.js 13 and Tailwind CSS 3.2. Thank to Vercel team work and incremental adoption, only one breaking change.
I'm already using: https://www.npmjs.com/package/eslint-plugin-tailwindcss. So, it also sort classnames in JSX Code
-
Why I personally hate Tailwind
Ever heard of eslint-plugin-tailwindcss?
-
Streamlining your Tailwind CSS workflow with ESLint + Prettier
eslint-plugin-tailwindcss for ESLint
What are some alternatives?
When comparing prettier-plugin-tailwindcss and eslint-plugin-tailwindcss you can also consider the following projects:
headwind - An opinionated Tailwind CSS class sorter built for Visual Studio Code
shopify-theme-lab - Shopify theme development environment using Liquid, Vue and Tailwind CSS. Built on top of Shopify CLI ๐งช
ts-node-dev - Compiles your TS app and restarts when files are modified.
material-tailwind - @material-tailwind is an easy-to-use components library for Tailwind CSS and Material Design.
claxed - Classes with the same style of Styled-Components
kutty - Kutty is a tailwind plugin for building web applications. It has a set of accessible and reusable components that are commonly used in web applications.