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 17, 2026

critical has 11,253 recorded weekly downloads on npm, a decrease of 62.2% over the past 30 days.

It ranks #880 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -65.0%.

PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.

Weekly downloads
11,253
Official API · Oct 17, 2026
7-day growth
-54.1%
-13.3K weekly downloads
30-day growth
-62.2%
-18.5K weekly downloads
90-day growth
-65.0%
-20.9K weekly downloads
Rank
#880
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.

Contents

• How it works • Quick start • Two engines • CLI reference • API reference • Inlining behavior • Tuning the above-the-fold set • MCP server (agents) • Recipes • Design principles • Requirements • Alternatives

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 as the first child of so it wins the cascade race against the deferred sheets. 2. Stops each from blocking the first paint, using the preload strategy:

The preload starts the download early; the stylesheet applies after the above-the-fold content (already styled by the inlined critical CSS) has painted. There is no inline event handler, so this works under a strict script-src Content Security Policy, and **no fallback is needed** — the stylesheet loads normally whether or not JavaScript runs.

Add data-critical-skip to a to leave it untouched. For a strict style-src CSP, pass inline: { nonce: "…" } to stamp the injected with your nonce.

Tuning the above-the-fold set

• [data-critical-fold] (static engine). By default the static engine inlines all _used_ CSS. Mark the container that holds your above-the-fold content with data-critical-fold and the static engine scopes matching to that subtree, producing a tighter critical set without a browser. • Viewports (render engine). Use width/height or dimensions to define exactly what "above the fold" means. Multiple dimensions union their results — useful for shipping one critical set that covers both mobile and desktop. • @font-face, @keyframes, custom properties are preserved when referenced; unused @keyframes and empty @media/@supports/@layer blocks are pruned.

MCP server (agents)

Critical ships a Model Context Protocol server so an agent can call it as a tool and receive the structured report back directly:

The tool takes src/html (plus optional css, engine, inline, width, height) and returns the critical CSS, the rewritten HTML, and the report as structured content. Requires the optional @modelcontextprotocol/sdk peer dependency.

Recipes

Optimize a static build directory (in CI):

Programmatically, writing both outputs:

An SPA where the shell is empty until JS runs:

Design principles

• Two engines, automatically routed. The fast path runs whenever the delivered DOM is the source of truth; the browser is used only when it's actually needed. • Platform-first, few dependencies. Three runtime dependencies — lightningcss (parse + minify + dead-code), linkedom (DOM), css-tree (rule walking). Everything else is a Node built-in (fetch, parseArgs, styleText, fs.glob). Heavy capabilities (playwright, the MCP SDK) are optional peers, imported lazily — you only pay for what you use. • Deterministic and explainable. Stable output bytes and a structured report that says what ran, why, and what it saved. • Safe by default. Nothing is written without an explicit flag; deferral adds no inline scripts, so the output works under a strict Content Security Policy.

Requirements

• Node.js ≥ 22.13 • The render engine additionally needs playwright and a browser: npm i -D playwright && npx playwright install chromium. The static engine needs neither.

Alternatives

Critical isn't the only way to inline critical CSS, and it isn't always the right one — a purely prerendered site that just wants its used CSS inlined may be better served by a lighter, browser-free tool. For a thorough, fair comparison of Critical, Beasties (formerly Critters), Penthouse, and native platform approaches — including where each one is the better choice and a reproducible benchmark — see COMPARISON.md.

Maintainers

This module is brought to you and maintained by the following people:

• Addy Osmani - Creator (Github) • Ben Zörb - Primary maintainer (Github)

License

Apache-2.0 © Addy Osmani

Description from the npm listing.

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

Where critical sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,256 listings · 113 pages · page 44, #20 (overall #880)
All npm: every listing in weekly downloads order
PNG SVG
MCP servers255 listings · 13 pages · page 7, #18 (overall #138)
MCP servers: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

critical weekly downloads on npm, last 90 days: 11,253 weekly downloads as of Oct 17, 2026, -65.0% over 90 days.criticalWeekly downloads on npm · Last 90 days11,253downloads / week-65.0% over 90 days05K10K15K20K25K30K35K40KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
critical weekly downloads on npm, last 90 days: 11,253 weekly downloads as of Oct 17, 2026, -65.0% over 90 days.
PNG SVG

7/30/90-day growth

critical weekly downloads growth on npm: -54.1% over 7 days, -62.2% over 30 days, -65.0% over 90 days.criticalWeekly downloads growth on npm11,253downloads / week now7-day growth-13,276 weekly downloads-54.1%30-day growth-18,481 weekly downloads-62.2%90-day growth-20,876 weekly downloads-65.0%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
critical weekly downloads growth on npm: -54.1% over 7 days, -62.2% over 30 days, -65.0% over 90 days.
PNG SVG

Ranking history

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

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.

Recent observations

Full history (543)
Recent weekly downloads observations for critical
Date (UTC)Weekly downloadsChange vs. previous
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+18
32,152—

Similar npm MCP servers plugins

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