# Emotion

> CSS-in-JS library designed for high performance style composition

Source: https://talira.ai/catalog/emotion-cdf86k4g
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / css in js](https://talira.ai/categories/libraries/css-in-js)
- Licence: MIT[^1]
- Pricing: Free and open source[^1][^2]
- Pricing notes: Free and open source under MIT, funded by Open Collective backers and sponsors.
- Free tier: yes[^1][^2]
- Self-hostable: yes
- Backed by: [Emotion](https://talira.ai/orgs/emotion-js.md)
- Funding: funded by donations[^2]

Emotion is a CSS-in-JS library for writing styles in JavaScript, as template strings or objects, with predictable composition that avoids specificity problems, source maps and labels for debugging, and caching for performance in production. The framework-agnostic `@emotion/css` package gives you a `css` function that returns class names; for [React](https://talira.ai/catalog/react-a48drvqv.md), `@emotion/react` adds a `css` prop with theming and zero-configuration server-side rendering, and `@emotion/styled` the `styled.div` API. A Babel plugin, [ESLint](https://talira.ai/catalog/eslint-0nyjt04g.md) plugins and testing utilities come with it. It is MIT-licensed and maintained by its community with Open Collective backers and sponsors.

## Links

- Website: https://emotion.sh/
- GitHub: https://github.com/emotion-js/emotion
- Docs: https://emotion.sh/docs/introduction

## Problems it solves

- keep each React component's styles in the same file as the component instead of a global stylesheet
- style components based on their props without juggling class names
- avoid CSS specificity fights when composing styles from several components
- a theme object with our colours and spacing that every styled component can read
- server-render styled React components without extra setup
- generate scoped class names from JavaScript in a project that doesn't use React
- see which component a generated class came from while debugging styles in devtools
- write nested selectors and media queries in JavaScript styles, with vendor prefixes added for me
- snapshot-test the styles my components render

## 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
- source maps and labels showing which component a class came from
- Babel plugin for minification and optimisation
- ESLint plugins and Jest testing utilities

## Trust

Overall: 0.37 out of 1.
Signals: backing 0.55, extensibility 0.00.

- has a company behind it
- funding: funded by donations

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [styled-components](https://talira.ai/catalog/styled-components-97cxpqhn.md): Fast, expressive styling for React. Server components, client components, streaming SSR, React Native, all one API.
- [StyleX](https://talira.ai/catalog/stylex-cqw1r35s.md): The expressive, type-safe, composable, predictable and themeable styling system for ambitious interfaces
- [goober](https://talira.ai/catalog/goober-bq3mcays.md): A less than 1KB css-in-js solution
- [Panda CSS](https://talira.ai/catalog/panda-css-tqftwdj6.md): Universal, type-safe, CSS-in-JS framework for design systems
- [vanilla-extract](https://talira.ai/catalog/vanilla-extract-f6hkm8zf.md): Zero-runtime Stylesheets-in-TypeScript

## Sources

[^1]: https://github.com/emotion-js/emotion/blob/main/LICENSE (checked 23 Nov 2026)
[^2]: https://github.com/emotion-js/emotion (checked 23 Nov 2026)
