Skip to content
PluginStats

critical weekly downloads statistics

By bezoerb · npm · MCP servers

Extract & inline critical-path CSS — two engines, automatic routing, agent-native.

View on npm Fresh · Dec 6, 2026

critical has 35,865 recorded weekly downloads on npm, an increase of 12.6% over the past 30 days, ranking #877 of 3,247 tracked listings.

Weekly downloads
35,865
Official API · Dec 5, 2026
7-day growth
+13.8%
+4.3K weekly downloads
30-day growth
+12.6%
+4K weekly downloads
90-day growth
+40.2%
+10.3K weekly downloads
Rank
#877
▲ 5 in 7 days

About critical

critical

Extract the critical-path (above-the-fold) CSS from your HTML, inline it, and load the rest asynchronously — so the browser can paint the first screen without waiting on a full stylesheet.

Critical removes render-blocking CSS from the critical path, which is one of the most direct levers on Largest Contentful Paint and first render. It works for static sites, MPAs, and single-page apps, and it's built to be driven by humans, build pipelines, and coding agents alike.

npm install --save-dev critical

Contents


How it works

Given an HTML document and its stylesheets, Critical:

  1. Determines what's critical. It figures out which CSS rules style the content that paints above the fold — either by matching rules against the delivered DOM (fast, no browser) or by rendering the page in a real viewport (accurate, handles SPAs). See Two engines.
  2. Inlines it. The critical rules go into a <style> at the top of <head> so first paint needs only the HTML.
  3. Defers the rest. Each <link rel="stylesheet"> is replaced in the head by a <link rel="preload"> and moved to the end of the body, so it no longer blocks first paint. No inline scripts are added, so it works under a strict Content Security Policy.

The output is deterministic: the same input produces byte-identical output, so it's safe to run in CI and diff in version control.

Quick start

CLI
# Optimize a build directory in place (inlines critical CSS, defers the rest)
critical ./dist --inline --write

# See what it would do and why, without writing anything
critical ./dist --explain

# A single file to stdout
critical index.html --inline > index.critical.html
API
import { critical } from "critical";

const { html, css, report } = await critical({
  src: "dist/index.html",
  inline: true,
});

// `html`   — the document with critical CSS inlined and stylesheets deferred
// `css`    — the critical CSS on its own (minified)
// `report` — structured diagnostics (engine used, bytes, rules, warnings, timing)

critical() never writes to disk on its own — it returns the result. Use the CLI's --write / --out, or write result.html / result.css yourself.

Docker

The container image includes Playwright and Chromium, so both the static and render engines work without additional setup. Mount the generated site at /site and include critical before its arguments:

docker pull ghcr.io/addyosmani/critical:master
docker run --rm -v "$PWD/dist:/site" ghcr.io/addyosmani/critical:master \
  critical . --inline --write

Two engines

Critical picks the right strategy for each document automatically (engine: "auto", the default), and tells you which it used and why.

EngineHow it decides what's criticalNeeds a browserBest for
staticMatches CSS rules against the delivered DOM (the used CSS)NoSSG / SSR / MPA output that ships real markup
renderLoads the page at a real viewport and measures what's painted above the foldYes (Playwright)SPA shells, and when you want a tight, viewport-accurate set

Automatic routing. When engine is "auto", Critical inspects the delivered HTML. If the document already contains rendered content, the static engine is correct and runs in milliseconds. If the document is an empty application shell (e.g. <div id="root"></div> with no markup yet), there's nothing to match against statically, so Critical escalates to the render engine and measures the page the way a browser actually paints it.

You can always pin the engine explicitly with engine: "static" or engine: "render".

The render engine uses Playwright, declared as an optional peer dependency. It's imported lazily, so the static path — and the default install — never pull in a browser. To use the render engine: npm i -D playwright && npx playwright install chromium.

CLI reference

critical <input> [options]

  input        a directory (all *.html are processed), an .html file, or stdin
```…

Description from the npm listing.

  • above-the-fold
  • critical
  • css
  • inline
  • lcp
  • mcp
  • performance

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

critical weekly downloads on npm, last 90 days: 35,865 weekly downloads as of Dec 5, 2026, +40.2% over 90 days.criticalWeekly downloads on npm · Last 90 days35,865downloads / week+40.2% over 90 days010K20K30K40KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
critical weekly downloads on npm, last 90 days: 35,865 weekly downloads as of Dec 5, 2026, +40.2% over 90 days.

7/30/90-day growth

critical weekly downloads growth on npm: +13.8% over 7 days, +12.6% over 30 days, +40.2% over 90 days.criticalWeekly downloads growth on npm35,865downloads / week now7-day growth+4,341 weekly downloads+13.8%30-day growth+4,000 weekly downloads+12.6%90-day growth+10,281 weekly downloads+40.2%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
critical weekly downloads growth on npm: +13.8% over 7 days, +12.6% over 30 days, +40.2% over 90 days.

Ranking history

critical npm ranking history: currently #877 (by weekly downloads).criticalnpm ranking · by weekly downloads · Last 90 days#877current rank#200#300#400#500#600#700#800#900Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
critical npm ranking history: currently #877 (by weekly downloads).

Listing placement

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

Listing placement

MCP servers468 listings · 24 pages · page 7, #17 (overall #137)
MCP servers: 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 (592)
Recent weekly downloads observations for critical
Date (UTC)Weekly downloadsChange vs. previous
35,865-1.8K
37,623+1.8K
35,822+691
35,131+1.7K
33,443+545
32,898+102
32,796+1.3K
31,524+191
31,333-398
31,731-1.2K
32,973-1.6K
34,597-37
34,634+302
34,332—

Similar npm MCP servers plugins

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