Skip to content
PluginStats

@underglass/css-compiler weekly downloads statistics

By underglass · npm · Webpack plugins

Opt-in build-time compiler that turns selected CSS animations into Underglass GPU programs, with Vite and webpack integrations.

View on npm Fresh · Nov 2, 2026

@underglass/css-compiler has 31 recorded weekly downloads on npm, a change of -56.3% over the past 7 days, ranking #2259 of 2,712 tracked listings.

Weekly downloads
31
Official API · Oct 31, 2026
7-day growth
-56.3%
-40 weekly downloads
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#2259
Among tracked npm listings

About @underglass/css-compiler

Underglass build-time CSS compiler

Experimental @underglass/css-compiler, the opt-in build-time route of Underglass. Explicitly selected animations compile to literal WebGPU compositor programs and matching numeric native-geometry samplers during the application build. Ordinary CSS, browser layout, React state and the original controls are retained. This is not a general CSS translator or a custom React renderer.

Live examples: underglass.dev · Source, guide and API: github.com/RaananW/underglass

npm install --save-dev @underglass/css-compiler   # beside @underglass/react, with Vite 8 or webpack 5

Configuration

Place underglass.config.json in the application root:

{
  "version": 1,
  "target": "webgpu",
  "unsupported": "error",
  "entries": [
    {
      "id": "card",
      "stylesheet": "@my-library/card/styles.scss",
      "selector": ".card",
      "animations": ["float"]
    }
  ]
}

Use a real exported package stylesheet or an explicit local path such as ./src/card.module.scss. The application's bundler resolves it; dependency files are never rewritten. A component must expose both usable styles and a public ref/enrollment boundary. Packages without those cannot be automatically adapted. schema.json provides an editor schema; unknown JSON fields (including $schema) are currently refused. Configuration accepts 1..32 targets. The output holds one per-layer compositor program that the runtime draws once per layer, so it does not limit the layer count; maxLayers is still accepted for compatibility and has no effect.

Vite

import { defineConfig } from "vite";
import { underglass } from "@underglass/css-compiler/vite";

export default defineConfig({
  plugins: [underglass({ configFile: "underglass.config.json" })],
});

The adapter uses Vite's preprocessing, configured PostCSS plugins and CSS Modules mapping, then substitutes generated code before final chunk emission. Chunk source maps are preserved. This is a production-build integration; vite dev, HMR and watch compilation are deliberately refused when the virtual module is requested.

webpack

import { UnderglassPlugin } from "@underglass/css-compiler/webpack";

export default {
  plugins: [new UnderglassPlugin({ configFile: "underglass.config.json" })],
  module: {
    rules: [{
      test: /\.scss$/,
      use: [
        { loader: "css-loader", options: {
          sourceMap: true, modules: { namedExport: false },
        } },
        { loader: "postcss-loader", options: { sourceMap: true } },
        { loader: "sass-loader", options: { sourceMap: true } },
      ],
    }],
  },
};

The adapter uses webpack's public resolver and importModule to run the real loader chain at build time. It currently requires one processed css-loader array part per stylesheet. Aggregated CSS imports, style-loader, MiniCssExtractPlugin and other injection/extraction outputs are not supported. The application must deliver the returned ordinary CSS itself:

import styles from "@my-library/card/styles.scss";
const sheet = document.createElement("style");
sheet.textContent = styles.toString();
document.head.append(sheet);
const cardClass = styles.locals.card;

This native stylesheet is essential for fallback. The integration does not invent a second CSS delivery pipeline. Sass @use partials and configured PostCSS transforms are exercised in the installed-package fixture; other preprocessors/loader chains require separate qualification.

Runtime enrollment

/// <reference types="@underglass/css-compiler/client" />
import compiled from "virtual:underglass/compiled";
import { mountCanvasApp, useSurfaceRef } from "@underglass/react";

function App() {
  const ref = useSurfaceRef({ id: "card" });
  return <Card ref={ref} className={cardClass} />;
}

const controller = mountCanvasApp({
  ordinaryHost, captureHost, outputCanvas,
  compiled, budgets: { layers: 2, pixels: 1_000_000 },
  onStatus: message => { diagnostics.textContent = message; },
}, <App />);
const motion = controller.ownCompiledAnimation("card", "card/float");
await controller.enable();

The three hosts must satisfy the existing stable sibling/root mount contract. Enrollment must reference the original direct root child, not a cloned control or a ref hidden inside a third-party component. Set transform-origin: 0 0; avoid competing inline transforms/opacity, individual transform properties or other animation owners.

Ownership checks the actual browser animation against the compiled descriptor before changing it. Only the enrolled animation is suppressed. Generated WGSL samples motion/opacity; a generated JS sampler synchronizes native affine hit geometry. Playback supports play, pause, seek and release. Disable, failure or disposal restores ordinary CSS behavior and the current time/play state without replacing React's original controls. The browser may recreate the CSSAnimation object; Animation-object identity is not guaranteed. Later authored declarations that differ from Underglass's owned values are preserved on restoration. Reassigning an identical value/priority is not distinguishable from the ownership lease's existing write.

Supported subset and boundaries

One unconditional top-level .class or #id rule, one named CSS keyframe animation, 2..32 increasing offsets spanning 0..1, and complete transform and opacity in every frame. Transforms use none or translate(px[, px]) rotate(deg) scale(number[, number]), with positive bounded scales. Timing supports positive duration, nonnegative delay, integer/infinite iterations, normal/alternate direction and both fill. Easing supports linear, named CSS easing and non-overshooting cubic-bezier control points in [0,1].…

Description from the npm listing.

  • webgpu
  • css
  • animation
  • vite-plugin
  • webpack-plugin

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

@underglass/css-compiler weekly downloads on npm, last 90 days: 31 weekly downloads as of Oct 31, 2026.@underglass/css-compilerWeekly downloads on npm · Last 90 days31downloads / week020406080100Aug 2Aug 17Sep 1Sep 16Oct 1Oct 16Oct 31downloads / weekobservedarchived (Internet Archive)no observationsAug 4, 2026 – Oct 31, 2026 · 89 observations · Updated Oct…pluginstats.com
@underglass/css-compiler weekly downloads on npm, last 90 days: 31 weekly downloads as of Oct 31, 2026.

7/30/90-day growth

@underglass/css-compiler weekly downloads growth on npm: -56.3% over 7 days, 30-day growth unavailable, 90-day growth unavailable.@underglass/css-compilerWeekly downloads growth on npm31downloads / week now7-day growth-40 weekly downloads-56.3%30-day growth+31 weekly downloadsInsufficient history90-day growth+31 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 31, 2026pluginstats.com
@underglass/css-compiler weekly downloads growth on npm: -56.3% over 7 days, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@underglass/css-compiler npm ranking history: currently #2259 (by weekly downloads).@underglass/css-compilernpm ranking · by weekly downloads · Last 90 days#2259current rank#1800#1900#2000#2100#2200#2300Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18Nov 2rankOct 31, 2026 – Nov 2, 2026 · 3 observations · Updated Oct 31, 2026pluginstats.com
@underglass/css-compiler npm ranking history: currently #2259 (by weekly downloads).

Listing placement

All npm2,712 listings · 136 pages · 1,358 shown · page 114, #6 (overall #2,266)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins289 listings · 15 pages · page 10, #1 (overall #181)
Webpack 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 (121)
Recent weekly downloads observations for @underglass/css-compiler
Date (UTC)Weekly downloadsChange vs. previous
31-11
42-19
61-38
99+14
85+7
78+3
75+4
71+11
60+19
41+41
00
00
00
0—

Similar npm Webpack plugins plugins

All 20 @underglass/css-compiler 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/@underglass/css-compiler. First seen Oct 31, 2026; last successful collection Nov 2, 2026. See the methodology.