Sourcemap Explorer
Stack · npm package

@emotion/react

> Simple styling in React.

latest 11.14.0· MIT· 42 versions publishedView on npm

About

> Simple styling in React.

Live mirror of the GitHub README. Updated whenever the repo's default branch changes.

Emotion logo

emotion

The Next Generation of CSS-in-JS

Emotion 11 has been released 🚀 See the blog post

Backers on Open Collective Sponsors on Open Collective npm version Build Status codecov @emotion/css size @emotion/css gzip size @emotion/react size @emotion/react gzip size @emotion/styled size @emotion/styled gzip size slack

Emotion is a performant and flexible CSS-in-JS library. Building on many other CSS-in-JS libraries, it allows you to style apps quickly with string or object styles. It has predictable composition to avoid specificity issues with CSS. With source maps and labels, Emotion has a great developer experience and great performance with heavy caching in production.

👀 Demo Sandbox

📖 Docs

Frequently viewed docs:

Quick Start

Get up and running with a single import.

npm install --save @emotion/react
/** @jsx jsx */
import { jsx } from '@emotion/react'

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

Do I Need To Use the Babel Plugin?

The babel plugin is not required, but enables some optimizations and customizations that could be beneficial for your project.

Look here 👉 emotion babel plugin feature table and documentation

Demo Sandbox

Demo Code Sandbox

Examples

Ecosystem

In the Wild

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Thinkmill

Backers

Thank you to all our backers! 🙏 [Become a backer]

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Quick facts

Latest version11.14.0
LicenseMIT
AuthorEmotion Contributors
Installnpm install @emotion/react
Direct dependencies8
Peer dependenciesreact

Common pairings

Packages this one expects to find in the same project. Each is also a Sourcemap Explorer detection target.

How Sourcemap Explorer detects @emotion/react

We catch @emotion/react from two complementary signals: bundled source paths and the embedded package.json. Modern bundlers (webpack, Vite, esbuild, Rollup, Turbopack) preserve the original node_modules/@emotion/react/ paths inside the JavaScript sourcemap's sources[] array — that's the canonical signal. When the matching package.json is also captured in sourcesContent[], we read the exact version field — patch number included. No regex guessing, no version inference.

  1. 1

    Confirm the site exposes sourcemaps

    In DevTools Network, check the response headers of any application script for `SourceMap` or `X-SourceMap`. Failing that, fetch the script's last 4 KB and look for a `//# sourceMappingURL=` comment.

  2. 2

    Find the package in the bundle

    Open DevTools → Network → reload. Click any application script and look at its sourcemap. Inside, search `sources[]` for entries matching `node_modules/@emotion/react/` — every match confirms the package is bundled. The matching `sourcesContent[i]` for `node_modules/@emotion/react/package.json` gives you the exact installed version.

  3. 3

    Read the version directly from package.json

    Run `jq -r '. as $m | $m.sources | to_entries[] | select(.value | endswith("node_modules/@emotion/react/package.json")) | $m.sourcesContent[.key] | fromjson | .version' bundle.js.map`. Sourcemap Explorer automates the same query in the popup.

Recent versions

Version
Released
11.0.0
11.1.0
11.1.1
11.1.2
11.1.3
11.1.4
11.1.5
11.4.0

FAQ

What is @emotion/react used for?

> Simple styling in React.

How can I tell if a website is using @emotion/react?

Open the page in Chrome with the Sourcemap Explorer extension installed and read the Stack tab. We catch `@emotion/react` from two complementary signals: `node_modules/@emotion/react/` paths inside the JavaScript sourcemap, and the embedded `package.json` we read for exact-version detection. Without the extension you can do the same lookup manually in DevTools — the steps are listed in the "How Sourcemap Explorer detects" section above.

What is the latest version of @emotion/react?

11.14.0, as published on the npm registry. The "Recent versions" table on this page lists the most recent 8 releases with their release dates. Sourcemap Explorer reports the version actually bundled into a site, which can lag the latest release by months on real-world deployments.

Where can I read more?

Project homepage: https://github.com/emotion-js/emotion/tree/main#readme. Source code: https://github.com/emotion-js/emotion.git#main. Published on npm: https://www.npmjs.com/package/@emotion/react. Licensed as MIT.

Detected by Sourcemap Explorer

When a bundle ships sourcemaps, we read the embedded package.json for @emotion/react and report the precise version. Without sourcemaps, an import / require in the page's scripts is enough to flag it.

Install free on Chrome