Need help with prettier-plugin-tailwind?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Acidic9
360 Stars 16 Forks MIT License 83 Commits 19 Opened issues

Description

Sort tailwind classes in HTML with Prettier.

Services available

!
?

Need anything else?

Contributors list

# 141,608
vscode
tailwin...
tailwin...
CSS
27 commits
# 398,819
prompt-...
Zsh
powersh...
golang
1 commit
# 19,618
TypeScr...
React N...
GraphQL
interse...
1 commit
# 227,060
React
React N...
node-js
js
1 commit

npm version

Prettier Plugin Tailwind

Sort tailwind classes with Prettier.


Supports

  • HTML
  • CSS (@apply directive)
  • ReactJS (JSX, TSX)
  • VueJS
  • twin.macro

Go from this:

...

To this:

...

This plugin reads your

tailwind.config.js
to sort tailwind classes in your project.

Installation VSCode

Install Prettier and the plugin into your project locally:

yarn add --dev prettier prettier-plugin-tailwind

Other IDE's are supported.

Note: Prettier 2.0.0 or greater is required as a peer dependency.

Prettier Options

These options can be set in your

.prettierrc
file to change the behavious of this plugin.

More details can be found in OPTIONS.md

Contributing 🙌

Contributions are more than welcome. If you see any changes fit, go ahead and open an issue or PR.


Any support is a huge motivation, thank you very much!

Buy Me A Coffee

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.