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 · Oct 18, 2026

critical has 13,416 recorded weekly downloads on npm, a decrease of 53.7% over the past 30 days, ranking #888 of 2,322 tracked listings.

Weekly downloads
13,416
Official API · Oct 18, 2026
7-day growth
-45.4%
-11.1K weekly downloads
30-day growth
-53.7%
-15.6K weekly downloads
90-day growth
-57.5%
-18.1K weekly downloads
Rank
#888
Among tracked npm listings

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: 13,416 weekly downloads as of Oct 18, 2026, -57.5% over 90 days.criticalWeekly downloads on npm · Last 90 days13,416downloads / week-57.5% over 90 days05K10K15K20K25K30K35K40KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
critical weekly downloads on npm, last 90 days: 13,416 weekly downloads as of Oct 18, 2026, -57.5% over 90 days.

7/30/90-day growth

critical weekly downloads growth on npm: -45.4% over 7 days, -53.7% over 30 days, -57.5% over 90 days.criticalWeekly downloads growth on npm13,416downloads / week now7-day growth-11,134 weekly downloads-45.4%30-day growth-15,581 weekly downloads-53.7%90-day growth-18,117 weekly downloads-57.5%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
critical weekly downloads growth on npm: -45.4% over 7 days, -53.7% over 30 days, -57.5% over 90 days.

Ranking history

critical npm ranking history: currently #888 (by weekly downloads).criticalnpm ranking · by weekly downloads · Last 90 days#888current rank#200#300#400#500#600#700#800#900Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 17, 2026 – Oct 20, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
critical npm ranking history: currently #888 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 45, #9 (overall #889)
All npm: every listing in weekly downloads order

Listing placement

MCP servers277 listings · 14 pages · page 8, #6 (overall #146)
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 (544)
Recent weekly downloads observations for critical
Date (UTC)Weekly downloadsChange vs. previous
13,416+2.2K
11,253-1.6K
12,806+211
12,595-5.4K
18,012-5.8K
23,8110
23,811-739
24,550+21
24,529-331
24,860-466
25,326-486
25,812-406
26,218-6K
32,170—

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 Oct 20, 2026. See the methodology.