# facebook/stylex

StyleX is the styling system for ambitious user interfaces.

Repository: https://github.com/facebook/stylex
Canonical: https://ross.abutalabs.com/products/stylex
Homepage: https://stylexjs.com
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-08-25T23:04:31+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 66, longevity 97
- inputs: {"age_days": 1364, "days_push": 8, "days_rel": 225, "gap_med": 13, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9912, forks 458 (observed 2026-08-28T04:10:38.761024+00:00)

## What it is
StyleX is a JavaScript styling system and compiler from Meta that generates optimized, collision-free atomic CSS at build time. It combines the ergonomics of CSS-in-JS with the performance of static CSS, offering type-safe styles, theming via CSS variables, and a tiny runtime for merging class names.

## Use cases
- style a react app with type-safe css-in-js
- generate atomic css at compile time to keep css bundles small
- avoid css specificity conflicts in a large codebase
- define themeable design tokens with css variables
- co-locate styles with components instead of separate css files
- integrate styling with next.js, vite, or webpack builds

## When to choose
- you maintain a large or fast-growing frontend where CSS size and specificity bugs are concerns
- you want type-safe, composable styles with predictable merge behavior
- you need static CSS extraction with minimal runtime overhead
- you want built-in theming with light/dark mode and CSS variables

## When to avoid
- you prefer plain CSS, CSS modules, or utility-class frameworks like Tailwind
- your project is small and doesn't need a compiler-based styling pipeline
- you rely heavily on highly dynamic runtime-generated style values
- your build setup lacks support for the required babel/postcss plugins

## Facets
- artifact type: library
- maturity: active
- function: css-framework, frontend-framework, build-tool
- domain: frontend, web-development, web-design
- platform: browser, cli
- tags: css-in-js, atomic-css, styling, compile-time-css, type-safe-styles, theming, react, babel-plugin, nodejs, web-server

## Member repositories
- facebook/stylex (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:38.761024+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-29T17:20:19.122488+00:00, confidence not recorded.
  - readme: https://github.com/facebook/stylex (fetched 2026-08-28T04:10:38.761024+00:00, sha 80fac0023995)
  - homepage: https://stylexjs.com (fetched 2026-08-29T08:20:31.499835+00:00, sha fa5da4dc10dc)
  - site_page: https://stylexjs.com/docs/learn (fetched 2026-08-29T08:20:31.502349+00:00, sha 802cf9e06ce0)
  - site_page: https://stylexjs.com/docs/api (fetched 2026-08-29T08:20:31.504434+00:00, sha 26d51428d576)
  - site_page: https://stylexjs.com/docs/learn/thinking-in-stylex (fetched 2026-08-29T08:20:31.506553+00:00, sha 63effde7e0f1)
  - site_page: https://stylexjs.com/docs/acknowledgements (fetched 2026-08-29T08:20:31.508690+00:00, sha a7ca9e7f4a3e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
