Skip to content
PluginStats

@zslabs/atomic-css-modules weekly downloads statistics

By zslabs · npm · Webpack plugins

Extract repeated CSS Modules declarations into shared atomic classes

View on npm Fresh · Nov 6, 2026

@zslabs/atomic-css-modules has 400 recorded weekly downloads on npm, ranking #1698 of 2,865 tracked listings.

Weekly downloads
400
Official API · Nov 4, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1698
Among tracked npm listings

About @zslabs/atomic-css-modules

@zslabs/atomic-css-modules

Extracts repeated CSS Modules declarations into shared atomic classes via composes.

Requirements

  • Node.js >=20.17 or >=22.5 (uses path.matchesGlob)
  • CSS Modules source (.module.css)
  • Vite ^8 when using the Vite plugin (vite is an optional peer)
  • webpack ^5 with css-loader ^7, or Rspack ^2 with css-loader or native CSS, when using the webpack plugin (all optional peers)
  • PostCSS ^8 when using the PostCSS plugin (optional peer). This is the Next.js integration, for Turbopack and for next dev --webpack

The core processCssModules API has no bundler dependency.

Install

npm install @zslabs/atomic-css-modules
Vite
import { defineConfig } from 'vite'
import { atomicCssModules } from '@zslabs/atomic-css-modules/vite'

export default defineConfig({
  plugins: [
    atomicCssModules({
      include: ['src/**/*.module.css'],
    }),
  ],
})
webpack / Rspack

Add the plugin alongside your existing CSS setup. It injects its own loaders ahead of css-loader, so no extra rules are needed.

import MiniCssExtractPlugin from 'mini-css-extract-plugin'
import { AtomicCssModulesWebpackPlugin } from '@zslabs/atomic-css-modules/webpack'

export default {
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [MiniCssExtractPlugin.loader, 'css-loader'],
      },
    ],
  },
  plugins: [
    new MiniCssExtractPlugin(),
    new AtomicCssModulesWebpackPlugin({
      include: ['src/**/*.module.css'],
    }),
  ],
}

On Rspack, use rspack.CssExtractRspackPlugin with the same rule, or native CSS with the standard { test: /\.css$/, type: 'css/auto' } rule and experiments.css: true.

Keep css-loader's default modules.auto (or any setting that only scopes *.module.css). The shared registry is a plain .css file shipped with the package and must stay global.

Next.js

Turbopack does not run webpack plugins, and it will not run a loader that rewrites stylesheets. Next.js does run postcss.config.js before Lightning CSS scopes .module.css, on Turbopack and on webpack. The PostCSS plugin is the integration.

// postcss.config.js
import { atomicCssModulesPostcss } from '@zslabs/atomic-css-modules/postcss'

export default {
  plugins: [atomicCssModulesPostcss()],
}

Next.js loads postcss.config.js in Node. It bundles postcss.config.mjs, and that bundle cannot load the native lightningcss addon this plugin uses, so the config file has to be postcss.config.js and Node has to treat it as ESM ("type": "module", or an app that already is). A CommonJS config that only names the package does not load it.

Put @atomic-css-modules; in the global CSS imported by the root layout. The plugin replaces that at-rule with the shared atom rules. App Router only allows global CSS from that layout, so the registry is not injected into components.

@atomic-css-modules;

body {
  margin: 0;
}

next dev uses readable atom names. next build uses short hashes. Globs are relative to the directory where the PostCSS config is loaded (root overrides that).

Options
OptionDefaultNotes
include**/*.module.cssGlobs relative to the Vite root, webpack context, or PostCSS cwd
exclude**/node_modules/**
debugNamestrue in dev, false in buildReadable atoms (color-red-a1b2c3) vs short hashes
report"summary""verbose" lists each skipped selector
preprocess—(code, filePath) => code before scan/atomize

"Dev" means vite serve, webpack/Rspack in development mode, or next dev. Production watch keeps the short hashes.

How it works

Matching declarations share one registry class. Single local classes are eligible, including simple pseudos and nested at-rules.

.card {
  color: red;
  &:hover {
    color: blue;
  }
  @media (min-width: 600px) {
    padding: 16px;
  }
}

becomes:

/* module */
.card {
  composes: bn89ziv jtnf3j g1h5a7 from global;
}
/* registry */
.bn89ziv {
  color: red;
}

.jtnf3j:hover {
  color: #00f;
}

@media (width >= 600px) {
  .g1h5a7 {
    padding: 16px;
  }
}

Selector eligibility, shorthand/longhand rules, and non-goals: GUIDE.md.

Skipping

Add /* atomic: skip */ before a selector, or as the first comment in a rule block, to leave that rule alone. Use it when a declaration would atomize but sharing it would break cascade or you need the styles to stay on the local class.

The first build logs atom count, skip reasons, and source vs registry bytes.

Caveats

  • Only selectors that CSS Modules can composes are atomized (see the guide).
  • Shorthand + longhand in the same rule skip those properties for that rule.
  • Stick to CSS Modules local classes. Do not stack atomized classes, or another utility system on the same node, to override the same property. Prefer one class, or /* atomic: skip */ when sharing would be wrong.
  • On small sheets, gzip/brotli often erase the atomic class win (many one-declaration rules compress worse than fewer larger ones). The payoff shows up when UI grows against a shared token surface: Modules CSS scales with components, the atom set scales with the design system.
  • This is 0.x: the supported surface below is stable within a minor when practical, but breaking changes may land before 1.0.

Public API

Supported…

Description from the npm listing.

  • atomic-css
  • css-modules
  • nextjs
  • postcss
  • rspack
  • rspack-plugin
  • vite
  • vite-plugin
  • webpack
  • 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

@zslabs/atomic-css-modules weekly downloads on npm, last 90 days: 400 weekly downloads as of Nov 4, 2026.@zslabs/atomic-css-modulesWeekly downloads on npm · Last 90 days400downloads / week360380400420440Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20Nov 4downloads / weekNov 4, 2026 – Nov 4, 2026 · 1 observations · Updated Nov 4, 2026pluginstats.com
@zslabs/atomic-css-modules weekly downloads on npm, last 90 days: 400 weekly downloads as of Nov 4, 2026.

7/30/90-day growth

@zslabs/atomic-css-modules weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@zslabs/atomic-css-modulesWeekly downloads growth on npm400downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Nov 4, 2026pluginstats.com
@zslabs/atomic-css-modules weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@zslabs/atomic-css-modules npm ranking history: currently #1698 (by weekly downloads).@zslabs/atomic-css-modulesnpm ranking · by weekly downloads · Last 90 days#1698current rank#1696#1697#1698#1699#1700Aug 8Aug 23Sep 7Sep 22Oct 7Oct 22Nov 6rankNov 6, 2026 – Nov 6, 2026 · 1 observations · Updated Nov 4, 2026pluginstats.com
@zslabs/atomic-css-modules npm ranking history: currently #1698 (by weekly downloads).

Listing placement

All npm2,864 listings · 144 pages · 1,433 shown · page 103, #5 (overall #2,045)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins305 listings · 16 pages · page 5, #19 (overall #99)
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 (1)
Recent weekly downloads observations for @zslabs/atomic-css-modules
Date (UTC)Weekly downloadsChange vs. previous
400—

Similar npm Webpack plugins plugins

All 20 @zslabs/atomic-css-modules 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/@zslabs/atomic-css-modules. First seen Nov 6, 2026; last successful collection Nov 6, 2026. See the methodology.