Development · GitHub repo
StyleX
Meta's type-safe, compile-time styling system for web applications
StyleX is an open-source CSS styling system developed by Meta that powers platforms like Facebook, Instagram, and Threads. It combines the developer ergonomics of CSS-in-JS with compile-time CSS extraction, ensuring zero runtime overhead and predictable style composition without specificity clashes. It includes built-in TypeScript support and an atomic CSS compiler.
What it's for
- Manage scoped, conflict-free styles across large web applications
- Enforce static type checking on CSS properties and design system tokens
- Compile styles into optimized atomic CSS bundles with zero runtime cost
Features
- Compile-time CSS extraction into atomic stylesheets
- Full TypeScript integration for type-safe CSS properties
- Deterministic style resolution that eliminates specificity issues
- Deterministic dynamic theming and token management
- Modular component-level styling using stylex.create and stylex.props
Pricing
Open source. Free and open-source (MIT License)
Details
- Type
- GitHub repo
- Category
- Development
- Topic
- CSS & Styling
- Open source
- Yes
- Platforms
- Code library, Web
- For
- Frontend engineers and design system developers building scalable JavaScript and TypeScript applications
- Alternative to
- Tailwind CSS, Styled Components, Emotion, Vanilla Extract
- Tags
- css, css in js, typescript, meta, styling, frontend
Why it was saved
- @icodestuff.io: Eliminates CSS specificity clashes and provides strict static type safety while keeping styles modular and compiling into optimized atomic CSS.
Related
Lightweight, modular JavaScript animation engine for CSS, SVG, and DOM elements
Resource vault and toolkit of animations, components, and transitions for Webflow and HTML
Declaratively anchor and toggle DOM markers on 3D scenes with CSS
Modern CSS technique for smooth height transitions without fixed pixel heights
Lightweight 5KB WebGL globe with CSS anchor positioning support
CSS recipe for interactive 3D card tilt and 2D layer parallax
Updated