Skip to content
PluginStats

prettier-plugin-tailwind-multiline weekly downloads statistics

By ivanlynch · npm · Prettier plugins

Prettier plugin that formats Tailwind classes in multiple lines for JS/TS/HTML

View on npm Fresh · Dec 6, 2026

prettier-plugin-tailwind-multiline has 55 recorded weekly downloads on npm, a decrease of 16.7% over the past 30 days, ranking #2756 of 3,247 tracked listings.

Weekly downloads
55
Official API · Dec 5, 2026
7-day growth
+83.3%
+25 weekly downloads
30-day growth
-16.7%
-11 weekly downloads
90-day growth
+57.1%
+20 weekly downloads
Rank
#2756
▼ 46 in 7 days

About prettier-plugin-tailwind-multiline

prettier-plugin-tailwind-multiline

A Prettier plugin that automatically formats Tailwind classes into multiple lines to improve code readability.

Features

  • Automatically splits Tailwind classes into multiple lines when there are more than X classes (configurable)
  • Maintains all Prettier existing functionality
  • Compatible with React (JSX/TSX), Vue, Angular, and other frameworks
  • Compatible with HTML files
  • Compatible with Vue and Svelte components
  • Easy to install and configure
  • Zero additional dependencies
  • Better code readability and maintainability

Installation

npm install --save-dev prettier-plugin-tailwind-multiline

or

yarn add --dev prettier-plugin-tailwind-multiline

Usage in your project

1. Automatic installation

Once installed, Prettier will automatically detect and use this plugin. No additional configuration is required if you already have Prettier set up in your project.

2. Configuration in different environments
In projects with a Prettier configuration file

If you have a .prettierrc, .prettierrc.json, or .prettierrc.js file in your project, you can configure the plugin by adding:

{
  "tailwindClassThreshold": 2
}
In projects with package.json

You can also configure Prettier directly in your package.json:

{
  "prettier": {
    "tailwindClassThreshold": 2
  }
}
In projects with ESLint + Prettier

If you're using the eslint-plugin-prettier, make sure to include this plugin in your ESLint configuration:

// .eslintrc.js
module.exports = {
  // ... other configurations
  extends: [
    // ... other extends
    'plugin:prettier/recommended'
  ],
  rules: {
    'prettier/prettier': ['error', {
      tailwindClassThreshold: 2,
    }]
  }
};
In VsCode with Prettier extension

If you use VS Code with the Prettier extension, no additional configuration is needed. The plugin will be automatically detected as long as it's installed in your project dependencies.

3. Usage with npm scripts

You can set up a script in your package.json to format all your files:

{
  "scripts": {
    "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,html,svelte,vue}\""
  }
}

And then run it with:

npm run format
4. Usage with formatting tools in CI/CD

To use in CI/CD environments, you can verify that all code is properly formatted:

npx prettier --check "src/**/*.{js,jsx,ts,tsx,html,svelte,vue}"

Example

Before:

<div className="flex flex-col items-center justify-center p-4 bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300">
  <h1>Hello World</h1>
</div>

After:

<div
  className={`
  flex
  flex-col
  items-center
  justify-center
  p-4
  bg-white
  rounded-lg
  shadow-md
  hover:shadow-lg
  transition-shadow
  duration-300
`}
>
  <h1>Hello World</h1>
</div>

HTML Before:

<div class="flex flex-col items-center justify-center p-4 bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300">
  <h1>Hello World</h1>
</div>

HTML After:

<div
  class="
  flex
  flex-col
  items-center
  justify-center
  p-4
  bg-white
  rounded-lg
  shadow-md
  hover:shadow-lg
  transition-shadow
  duration-300
"
>
  <h1>Hello World</h1>
</div>

Vue Before:

<template>
  <div class="bg-white shadow-xl rounded-lg overflow-hidden">
    <div class="bg-gradient-to-r from-blue-500 to-indigo-600 px-6 py-4">
      <div class="flex items-center justify-between">
        <h2 class="text-2xl font-bold text-white">Dashboard</h2>
      </div>
    </div>
  </div>
</template>

Vue After:

<template>
  <div class="
  bg-white
  shadow-xl
  rounded-lg
  overflow-hidden
">
    <div class="
  bg-gradient-to-r
  from-blue-500
  to-indigo-600
  px-6
  py-4
">
      <div class="
  flex
  items-center
  justify-between
">
        <h2 class="
  text-2xl
  font-bold
  text-white
">Dashboard</h2>
      </div>
    </div>
  </div>
</template>

Svelte Before:

<button class="bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-6 rounded-full shadow-md hover:shadow-lg transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">
  Incrementar
</button>

Svelte After:

<button class="
  bg-blue-500
  hover:bg-blue-600
  text-white
  font-medium
  py-2
  px-6
  rounded-full
  shadow-md
  hover:shadow-lg
  transition-all
  duration-300
  focus:outline-none
  focus:ring-2
  focus:ring-blue-500
  focus:ring-opacity-50
">
  Incrementar
</button>

Configuration

You can adjust the minimum number of classes needed to trigger multiline formatting:

{
  "tailwindClassThreshold": 2
}
  • tailwindClassThreshold: (default: 2) Number of classes after which formatting will be applied in multiple lines

Troubleshooting

If the plugin doesn't seem to be working:

  1. Make sure Prettier is correctly configured
  2. Verify that the plugin is installed in the current project
  3. Confirm there are no conflicts with other Prettier plugins

Compatibility

  • Prettier v3.0.0 or higher
  • JavaScript/TypeScript/JSX/TSX
  • Projects with React, Vue, Angular, etc.
  • HTML files

How it works

The plugin uses regular expressions to identify className attributes with multiple Tailwind classes and converts them into multiline template strings. The process occurs during Prettier's preprocessing phase, before standard formatting is applied.

Contributions

Contributions are welcome. To contribute:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT

Author

Ivan Lynch

Description from the npm listing.

  • prettier
  • prettier-plugin
  • tailwindcss
  • tailwind
  • formatting
  • jsx
  • react
  • typescript
  • tsx
  • html
  • ui
  • readability

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

prettier-plugin-tailwind-multiline weekly downloads on npm, last 90 days: 55 weekly downloads as of Dec 5, 2026, +57.1% over 90 days.prettier-plugin-tailwind-multilineWeekly downloads on npm · Last 90 days55downloads / week+57.1% over 90 days020406080Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
prettier-plugin-tailwind-multiline weekly downloads on npm, last 90 days: 55 weekly downloads as of Dec 5, 2026, +57.1% over 90 days.

7/30/90-day growth

prettier-plugin-tailwind-multiline weekly downloads growth on npm: +83.3% over 7 days, -16.7% over 30 days, +57.1% over 90 days.prettier-plugin-tailwind-multilineWeekly downloads growth on npm55downloads / week now7-day growth+25 weekly downloads+83.3%30-day growth-11 weekly downloads-16.7%90-day growth+20 weekly downloads+57.1%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-tailwind-multiline weekly downloads growth on npm: +83.3% over 7 days, -16.7% over 30 days, +57.1% over 90 days.

Ranking history

prettier-plugin-tailwind-multiline npm ranking history: currently #2756 (by weekly downloads).prettier-plugin-tailwind-multilinenpm ranking · by weekly downloads · Last 90 days#2756current rank#1800#2000#2200#2400#2600#2800Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-tailwind-multiline npm ranking history: currently #2756 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 138, #16 (overall #2,756)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 6, #11 (overall #111)
Prettier plugins: every listing in weekly downloads order

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 (170)
Recent weekly downloads observations for prettier-plugin-tailwind-multiline
Date (UTC)Weekly downloadsChange vs. previous
55+1
54+29
250
25-4
29+3
26-3
29-1
300
30-16
46-14
60+2
58-6
64+4
60—

Data 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-multiline. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.