Skip to content
PluginStats

prettier-plugin-latte-tailwindcss weekly downloads statistics

By zipper · npm · Prettier plugins

Prettier plugin for sorting Tailwind CSS v4 classes in Latte v3 templates

View on npm Fresh · Dec 6, 2026

prettier-plugin-latte-tailwindcss has 23 recorded weekly downloads on npm, a decrease of 25.8% over the past 30 days, ranking #2960 of 3,247 tracked listings.

Weekly downloads
23
Official API · Dec 5, 2026
7-day growth
+53.3%
+8 weekly downloads
30-day growth
-25.8%
-8 weekly downloads
90-day growth
+43.8%
+7 weekly downloads
Rank
#2960
▼ 81 in 7 days

About prettier-plugin-latte-tailwindcss

prettier-plugin-latte-tailwindcss

npm version license

A Prettier plugin that sorts Tailwind CSS v4 classes in Latte v3 templates.

The official prettier-plugin-tailwindcss does not support Latte. This plugin fills that gap — it handles class, n:class, class={[...]}, and custom locations via classRegex.

Installation

npm install -D prettier-plugin-latte-tailwindcss

Peer dependencies: prettier >= 3.0.0 and @tailwindcss/node >= 4.0.0.

Minimal .prettierrc:

{
  "plugins": ["prettier-plugin-latte-tailwindcss"],
  "tailwindStylesheet": "./resources/css/app.css"
}

If you omit tailwindStylesheet, the plugin uses a default @import "tailwindcss" which gives standard Tailwind class order. Set it when you have custom utilities or theme customizations.

What gets sorted

Standard HTML attributes

class and n:class attributes are always sorted automatically.

{* Before *}
<div class="mt-4 flex text-left items-center">
<div n:class="'mt-4', 'flex', $active ? 'font-bold', 'text-sm', 'items-center'">

{* After *}
<div class="flex items-center text-left mt-4">
<div n:class="'flex', 'mt-4', $active ? 'font-bold', 'items-center', 'text-sm'">
Latte array class syntax
{* Before *}
<div class={['mt-4', 'flex', 'active' => $isActive, $dynamicClass, 'text-sm']}>

{* After *}
<div class={['flex', 'mt-4', 'active' => $isActive, $dynamicClass, 'text-sm']}>
Custom locations via classRegex

Class strings inside {embed} / {include} parameters, class => in custom tags, $class variables, and more:

{embed '~card',
  class: 'mt-4 flex items-center',
  backgroundClass: $highlighted ? 'bg-brand-primary'}

{pdImg $image product-600,
  class => 'mt-4 flex items-center'}

The plugin auto-detects classRegex patterns from your IDE configuration (.vscode/settings.json or .idea/tailwindcss.xml). See Class Regex documentation for setup and recommended patterns.

Options

OptionTypeDefaultDescription
tailwindStylesheetstring—Path to CSS entry point with @import "tailwindcss"
tailwindClassRegexstring""JSON array of classRegex patterns; empty = auto-detect from IDE
tailwindAttributesstring[][]Additional HTML attributes to sort as class lists
tailwindNclassWhitespacestring"normalize-barriers"How n:class whitespace is handled: preserve, normalize-barriers, normalize
tailwindPreserveWhitespacebooleanfalsePreserve whitespace in class attributes
tailwindPreserveDuplicatesbooleanfalseKeep duplicate classes
tailwindPropertyOrderstring""Path to stylelint-order compatible config for custom CSS property ordering
tailwindClassOrderstring""Bucket-based class ordering (unknown / tailwind / regex patterns). Path to JS/JSON file, or JSON-encoded string starting with [

See Options documentation for detailed descriptions and examples.

n:class sorting model

The plugin uses a barrier model for n:class sorting:

  • Sortable tokens: bare identifiers (active), single-class strings ('flex')
  • Barrier tokens: conditionals ($x ? 'active'), variables ($class), multi-class strings ('btn font-bold')

Sortable tokens between barriers are reordered by Tailwind order. Barrier tokens never move. Classes within any quoted string or conditional branch are always sorted internally.

Editor setup

PhpStorm / WebStorm
  1. Settings → Languages & Frameworks → JavaScript → Prettier
  2. Set Run for files to: {**/*.{js,ts,jsx,tsx,css,scss,html,json,latte}}
  3. Optionally enable On save
VS Code
  1. Install the Prettier extension
  2. Add to settings.json:
{
  "[latte]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  }
}

Known limitations

  • Range formatting may have off-by-one behavior due to the Latte preprocessing step.
  • Cross-barrier ordering is intentionally not supported in n:class.

Support

If this plugin saves you time, consider supporting its development:

License

MIT

Description from the npm listing.

  • prettier
  • prettier-plugin
  • tailwindcss
  • latte
  • nette

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-latte-tailwindcss weekly downloads on npm, last 90 days: 23 weekly downloads as of Dec 5, 2026, +43.8% over 90 days.prettier-plugin-latte-tailwindcssWeekly downloads on npm · Last 90 days23downloads / week+43.8% over 90 days0102030405060Sep 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-latte-tailwindcss weekly downloads on npm, last 90 days: 23 weekly downloads as of Dec 5, 2026, +43.8% over 90 days.

7/30/90-day growth

prettier-plugin-latte-tailwindcss weekly downloads growth on npm: +53.3% over 7 days, -25.8% over 30 days, +43.8% over 90 days.prettier-plugin-latte-tailwindcssWeekly downloads growth on npm23downloads / week now7-day growth+8 weekly downloads+53.3%30-day growth-8 weekly downloads-25.8%90-day growth+7 weekly downloads+43.8%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-latte-tailwindcss weekly downloads growth on npm: +53.3% over 7 days, -25.8% over 30 days, +43.8% over 90 days.

Ranking history

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

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 149, #2 (overall #2,962)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 9, #8 (overall #168)
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-latte-tailwindcss
Date (UTC)Weekly downloadsChange vs. previous
230
23-1
24+17
7-1
8+2
6-1
7-8
150
15+2
13+2
110
110
11-2
13—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-latte-tailwindcss alternatives

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