Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Emotion

CSS-in-JS library for styling React components with scoped styles and theming.

Styling and CSSNPM

GitHubWebsite

1. License

License from npm.

github.com/emotion-js/emotion

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Emotion does

Emotion ships as a framework-agnostic <code>css</code>/<code>cx</code> package that needs no setup, and a separate React package whose <code>css</code> prop comes with theming and server rendering the docs describe as zero-config.

Emotion popularity

77 / 100
Gid Score, #151 overall
29.3M
downloads a week, npm
18K
GitHub stars
116
agent projects use it
Emotion: downloads per weeknpm, @emotion/react 29,301,992
Emotion: GitHub starsemotion-js/emotion 18,037

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Emotion is used

  • Emotion is a dependency in 116 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (2.4% of the 4,867 JavaScript/TypeScript ones), #3 of 53 in styling and css.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 495; those are left out of every share on this page.
  • The most used alternative in our scan is styled-components (19 projects).
  • Projects that use it most often also use React (97.4%), React Hook Form (52.6%), Material UI (50.9%).

By coding agent

69 projects, 2.3%
60 projects, 1.8%
53 projects, 2.2%
12 projects, 2.6%
9 projects, 2.6%
6 projects, 1.3%
5 projects, 1.8%
5 projects, 3.6%

Often used with

In 97.4% of its projects
In 52.6% of its projects
In 50.9% of its projects
In 46.6% of its projects
In 43.1% of its projects
In 55.2% of its projects
In 42.2% of its projects
In 91.4% of its projects

Emotion in practice

Strengths

A css prop that goes past inline style

The docs say the <code>css</code> prop is like <code>style</code> but also handles vendor prefixes, nested selectors and media queries. You can style elements directly, without first defining styled components.

Theme values inside the css prop

The <code>css</code> prop also accepts a function. That function is called with your theme, which gives you shared values where you write the styles.

Zero-config SSR and theming in @emotion/react

For the React package, the docs list server-side rendering "with zero configuration" and theming that "works out of the box". They also mention ESLint plugins that check patterns and configuration.

@emotion/css needs no build changes

The docs say the framework-agnostic package needs no extra setup, no Babel plugin and no other config changes. It still supports vendor prefixes, nested selectors and media queries.

Watch out for

SSR takes extra work with @emotion/css

The docs say server-side rendering with the framework-agnostic package "requires additional work to set up". They list zero-config SSR as a feature of <code>@emotion/react</code>.

React package: best with a configurable build

<code>@emotion/react</code> requires React. The docs call it "Best when using React with a build environment that can be configured."

styled comes with the React package

The install command in the docs for <code>@emotion/styled</code> also installs <code>@emotion/react</code>.

README quick start: the css prop

/** @jsx jsx */
import { jsx } from '@emotion/react'

let SomeComponent = props => {
  return (
    <div css={{ color: 'hotpink' }} {...props} />
  )
}

More about Emotion

Funding
  • Open Collective: https://opencollective.com/emotion

See all

Agent Skills for it
  • react-modernization: Upgrade React applications to latest versions, migrate from class components to hooks, and adopt concurrent features. Use when modernizing R
  • react-native-dev: React Native and Expo development guide covering components, styling, animations, navigation, state management, forms, networking, performan
  • react-expert: Use when building React 18+ applications in .jsx or .tsx files, Next.js App Router projects, or create-react-app setups. Creates components,
  • react-vite-dashboard: Convert Stitch designs into production React + Vite dashboards with TanStack Query, accessible tokens from DESIGN.md, and Web3-ready pattern
  • react-composition-patterns: React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component librarie
  • react-hook-form: React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, useFieldArray, the subscrib

See all

Packages around it
  • @emotion/styled: styled.div component API
  • @emotion/is-prop-valid: @emotion/is-prop-valid
  • @emotion/cache: Emotion cache package
  • @emotion/server: Emotion server rendering package
  • @emotion/css: Framework-agnostic css and cx
  • @emotion/babel-plugin: Optional Babel plugin
More in Styling and CSS

Alternatives

Emotion This page

MITGid 7729.3M/wk

styled-components

CSS-in-JS library for styling React components with dynamic scoped styles.

MITGid 7515.1M/wk

Compare Emotion with another tool

Get started

Install it.

npm install @emotion/react

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Emotion
- In React projects, prefer `@emotion/react`; the docs recommend it for React users "if possible".
- For the `css` prop, follow the README quick start: it shows a `/** @jsx jsx */` pragma and `import { jsx } from '@emotion/react'` at the top of the file.
- When adding `@emotion/styled`, install it together with `@emotion/react`, as the docs do.
- Outside React, use `@emotion/css`: call `css` to generate class names and `cx` to compose them.
- If a project uses `@emotion/css` with server rendering, expect setup work; the docs say SSR there "requires additional work to set up".
- To read theme values in the `css` prop, pass a function; the docs say it is called with the theme.
- Do not add the Babel plugin by default; the README says it is not required and links a feature table describing what it enables.