| What it is | CSS-in-JS library designed for high performance style composition | Fast, expressive styling for React. Server components, client components, streaming SSR, React Native, all one API. | The expressive, type-safe, composable, predictable and themeable styling system for ambitious interfaces | A less than 1KB css-in-js solution |
| Features | - string and object styles
- framework-agnostic css function and cx composition (@emotion/css)
- css prop for React elements, with access to the theme (@emotion/react)
- styled.div style API for creating components (@emotion/styled)
- theming with a ThemeProvider
- server-side rendering with zero configuration for @emotion/react
- global styles, keyframes, nested selectors and media queries
- automatic vendor prefixing
- All 11 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
| - 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
| - styled, css, keyframes and createGlobalStyles APIs
- about 1KB
- framework agnostic (React, Preact)
- render into any DOM target
- theming
- shouldForwardProp
- server-side rendering with extractCss
- prefixer (goober/prefixer)
- All 12 features
|