| What it is | Zero-runtime Stylesheets-in-TypeScript | The expressive, type-safe, composable, predictable and themeable styling system for ambitious interfaces | Fast, expressive styling for React. Server components, client components, streaming SSR, React Native, all one API. | Universal, type-safe, CSS-in-JS framework for design systems |
| Features | - styles in .css.ts files compiled to static CSS at build time, with no runtime in the bundle
- locally scoped class names, CSS variables, @keyframes and @font-face
- type-safe styles via CSSType
- theme system with typed token contracts and simultaneous themes
- selectors, pseudo-classes, media, feature and container queries, and global styles
- styleVariants to group style variants by name
- calc utilities for variable-based expressions
- official integrations for Vite, esbuild, webpack, Next.js, Parcel, Rollup and Gatsby, plus a Jest transform
- All 10 features
| - stylex.create and stylex.props: object styles defined next to components
- compile-time generation of a static, collision-free atomic CSS file
- last applied style wins for each property; arbitrary styles merge and compose
- typed styles: components can accept or restrict style props (StyleXStyles, StyleXStylesWithout)
- variables, constants and themes with defineVars, defineConsts and createTheme
- light and dark themes, context-driven styles with stylex.when
- keyframes, view transition classes and position-try fallbacks
- Babel plugin, PostCSS plugin, unplugin (Vite, webpack, Rspack, esbuild) and a CLI
- All 9 features
| - CSS in tagged template literals that become React components with scoped class names
- styles that adapt to props, and extending one styled component from another
- ThemeProvider theming, and createTheme() for CSS variable themes in server and client components (v6.4)
- React Server Components support with no 'use client' needed (v6.3)
- streaming server-side rendering via renderToPipeableStream (v6.2)
- createGlobalStyle for global styles, and .attrs() for default props
- TypeScript-native types since v6
- React Native support through styled-components/native
- All 10 features
| - css() function, JSX style props, layout patterns and cva-style recipes that all compile to atomic CSS
- static extraction at build time: only the styles you use reach the stylesheet
- codegen of a type-safe styled-system package from your config
- design tokens, semantic tokens, composite styles, themes and dark mode
- slot recipes for multi-part components and config recipes for design systems
- output with CSS variables and cascade layers, with a polyfill option
- PostCSS plugin and Panda CLI with watch mode
- framework guides for Next.js, Vite, Astro, Nuxt, Vue, Svelte, SolidJS, Qwik, Angular and more
- All 12 features
|