# gajus/babel-plugin-react-css-modules

Transforms styleName to className using compile time CSS module resolution.

Repository: https://github.com/gajus/babel-plugin-react-css-modules
Canonical: https://ross.abutalabs.com/products/babel-plugin-react-css-modules
Language: JavaScript
License: NOASSERTION
License Family: other
Topics: css-modules, react, babel-plugin
Last push: 2022-08-10T18:36:58+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3560, "days_push": 1484, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2034, forks 159 (observed 2026-08-28T04:06:07.846538+00:00)

## What it is
A Babel plugin that transforms React's styleName attribute into className at compile time using CSS module resolution. It offers much lower runtime overhead and bundle size than the runtime react-css-modules alternative.

## Use cases
- use css modules in react without runtime overhead
- resolve styleName to className at build time
- speed up react css modules performance
- reduce bundle size compared to react-css-modules
- support dynamic styleName resolution in react components
- migrate from react-css-modules to a babel-based approach

## When to choose
- you use React with CSS Modules and want minimal runtime cost
- you need a small footprint alternative to react-css-modules
- your build pipeline already uses Babel

## When to avoid
- your project does not use Babel
- you need actively maintained software with timely bug fixes
- you use modern CSS Modules support built into bundlers like webpack or Vite

## Facets
- artifact type: plugin
- maturity: maintenance
- function: build-tool, css-framework, frontend-framework
- domain: web-development, frontend, developer-tools
- platform: -
- tags: babel-plugin, css-modules, react, compile-time, stylename, nodejs, javascript

## Member repositories
- gajus/babel-plugin-react-css-modules (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:07.846538+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:59:24.024207+00:00, confidence not recorded.
  - readme: https://github.com/gajus/babel-plugin-react-css-modules (fetched 2026-08-28T04:06:07.846538+00:00, sha 679f18b57a12)
  - registry_npm: https://registry.npmjs.org/babel-plugin-react-css-modules (fetched 2026-08-29T10:39:07.715997+00:00, sha 36540f81f15d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
