# @swc/plugin-emotion

> SWC plugin for emotion css-in-js library

Latest version **16.0.0** (published 2026-09-04) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @swc/plugin-emotion
pnpm add @swc/plugin-emotion
yarn add @swc/plugin-emotion
bun add @swc/plugin-emotion
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 16.0.0 |
| Published | 2026-09-04 |
| First published | 2022-07-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 388 |
| Author | 강동윤 |
| Maintainers | kdy1 |

## Links

- npm: https://www.npmjs.com/package/@swc/plugin-emotion
- Repository: https://github.com/swc-project/plugins
- Homepage: https://swc.rs
- Issues: https://github.com/swc-project/plugins/issues
- npm.io page: https://npm.io/package/@swc/plugin-emotion

## Dependencies (1)

- [@swc/counter](https://npm.io/package/@swc/counter.md) ^0.1.3

## Recent versions

- 16.0.0 (latest) — 2026-09-04
- 15.0.0 — 2026-08-15
- 14.19.0 — 2026-08-12
- 14.15.0 — 2026-07-06
- 14.14.1 — 2026-07-01
- 14.14.0 — 2026-06-21
- 14.13.0 — 2026-06-17
- 14.12.0 — 2026-05-30
- 14.11.0 — 2026-05-27
- 14.10.0 — 2026-05-21
- 14.9.0 — 2026-04-27
- 14.8.0 — 2026-04-03
- 14.7.0 — 2026-02-26
- 14.6.0 — 2026-02-17
- 14.5.0 — 2026-01-27
- … 177 more at https://npm.io/package/@swc/plugin-emotion/versions

## README

# emotion

The official plugin for emotion css-in-js library.

## Configuration

The plugin uses the same config as described in [Next emotion documentation](https://nextjs.org/docs/advanced-features/compiler#emotion).

```js
{
  jsc: {
    ...
   experimental: {
     plugins: [ ['@swc/plugin-emotion', {
      // default is true. It will be disabled when build type is production.
      sourceMap?: boolean,
      // default is 'dev-only'.
      autoLabel?: 'never' | 'dev-only' | 'always',
      // default is '[local]'.
      // Allowed values: `[local]` `[filename]` and `[dirname]`
      // This option only works when autoLabel is set to 'dev-only' or 'always'.
      // It allows you to define the format of the resulting label.
      // The format is defined via string where variable parts are enclosed in square brackets [].
      // For example labelFormat: "my-classname--[local]", where [local] will be replaced with the name of the variable the result is assigned to.
      labelFormat?: string,
    }] ]
   }
}
```

## Credit

Source code for plugin itself (not transforms) are copied from https://github.com/IvanRodriCalleja/emotion-swc-plugin

# @swc/plugin-emotion

## 16.0.0

### Major Changes

- a9a7fe9: build!: Update swc_core to v78.0.0

## 15.0.0

### Major Changes

- 74931df: build!: Update swc_core to v77.0.0

## 14.19.0

### Minor Changes

- 8d2db7f: build: Update swc_core to v76.0.0

## 14.18.0

### Minor Changes

- 1a6fdee: build: Update swc_core to v75.0.0

## 14.17.0

### Minor Changes

- 6051cea: build: Update swc_core to v74.0.0

## 14.16.0

### Minor Changes

- b7be81b: build: Update swc_core to v73.0.0

## 14.15.0

### Minor Changes

- 4b382e7: build: Update swc_core to v72.0.0

## 14.14.1

### Patch Changes

- b6b2355: Keep dynamic Emotion JSX css prop arrays unwrapped so theme callbacks are evaluated by Emotion's JSX runtime.
- e785517: build: Update swc_core to v71.0.5
- 14bd92c: Handle React Compiler output with synthetic spans.

## 14.14.0

### Minor Changes

- 7cc5e96: build: Update swc_core to v72

## 14.13.0

### Minor Changes

- c3013d7: build: Update swc_core to v69

### Patch Changes

- 49044fc: Fix extraneous spaces in compiled template strings

## 14.12.0

### Minor Changes

- 3b04284: build: Update swc_core to v68

## 14.11.0

### Minor Changes

- 3b4d5b9: build: Update swc_core to v67

## 14.10.0

### Minor Changes

- 5e967fc: build: Update swc_core to v66.0.3

## 14.9.0

### Minor Changes

- d2f9cfa: build: Update swc_core to v65.0.0

### Patch Changes

- 2a1be0d: Fix the emotion `keyframes` auto-label regression so generated animations keep the plain name string instead of receiving a `label:` CSS fragment.

## 14.8.0

### Minor Changes

- a0fb975: Update swc_core to v61.0.1

## 14.7.0

### Minor Changes

- 1cbeb5a: build: Update swc_core to v58.0.1

## 14.6.0

### Minor Changes

- 2113ddb: build: Update swc_core to v57

## 14.5.0

### Minor Changes

- 870774a: build: Update swc_core to v56

## 14.4.0

### Minor Changes

- 66f5258: build: Update swc_core to v55.x.x

## 14.3.0

### Minor Changes

- 9c163ec: Update swc_core to v53, really

## 14.2.0

### Minor Changes

- 3799fa4: Update swc_core to v53.0.0

## 14.1.0

### Minor Changes

- 0a1d66f: Update swc_core to v52.0.0

## 14.0.1

### Patch Changes

- a73246f: build: Update swc_core to v49.0.0

## 14.0.0

### Major Changes

- 6c46f86: feat: Enable backward-compatibility feature

## 13.1.1

### Patch Changes

- ad79e09: Update swc_core to v48.0.4

## 13.1.0

### Minor Changes

- 7a0fbdb: Update swc_core to v48

## 13.0.0

### Major Changes

- 593f438: Update swc_core to v47

## 12.0.0

### Major Changes

- 25e0c2c: Update swc_core to v46.0.0

## 11.5.0

### Minor Changes

- c324a59: Update swc_core to v45

## 11.4.0

### Minor Changes

- 8bad98d: Update swc_core to v44

## 11.3.0

### Minor Changes

- 47be132: Update swc_core to v42

## 11.2.0

### Minor Changes

- 0c9d7a1: build: Update swc_core to v39.0.0

## 11.1.0

### Minor Changes

- a872100: build: Update swc_core to v38

## 11.0.3

### Patch Changes

- 9cdcdc5: Update swc_core to v36

## 11.0.2

### Patch Changes

- 9b08ff7: Update swc_core to v35

## 11.0.1

### Patch Changes

- df280ad: Update swc_core to v34.0.0

## 11.0.0

### Major Changes

- 562e755: Update swc_core to v33

## 10.0.4

### Patch Changes

- 85719ca: Update swc_core to v32

## 10.0.3

### Patch Changes

- 45d1ac7: Update swc_core to v31

## 10.0.2

### Patch Changes

- 54febbc: Update swc_core to v29

## 10.0.1

### Patch Changes

- 8d5ce5c: Update swc_core to v28.0.0

## 10.0.0

### Major Changes

- cf2636b: Update swc_core to v27

## 9.0.5

### Patch Changes

- e3e743d: Update swc_core to v27

## 9.0.4

### Patch Changes

- 5ddbaeb: Update swc_core to v23

## 9.0.3

### Patch Changes

- d51d525: Update swc_core to v22.0.0

## 9.0.2

### Patch Changes

- cb94b92: Update swc_core to v21.0.1

## 9.0.1

### Patch Changes

- 31e3254: build: Update `swc_core` to `v19.0.0`

## 9.0.0

### Major Changes

- f0fee1d: Update swc_core to v15.0.1

## 8.7.2

### Patch Changes

- 04465bc: Update swc_core to v14.0.0, really

## 8.7.1

### Patch Changes

- ce8d317: Update swc_core to v14.0.0

## 8.7.0

### Minor Changes

- bfa0a51: Update swc_core to v13

## 8.6.0

### Minor Changes

- b8c4e6c: Update swc_core to v12

## 8.5.0

### Minor Changes

- 4c8b0e2: Update swc_core

## 8.4.0

### Minor Changes

- 6f6fff8: Improve performance

## 8.3.0

### Minor Changes

- 4e7336c: Remove needless allocations

## 8.2.0

### Minor Changes

- 54b4a1a: Remove needless allocations

## 8.1.0

### Minor Changes

- 05a2458: Improve performance greatly

## 8.0.4

### Patch Changes

- e8973e8: Update swc_core to v10.2.3

## 8.0.3

### Patch Changes

- f436a09: Update swc_core to v10.

## 8.0.2

### Patch Changes

- f155bce: Update swc_core to v9

## 8.0.1

### Patch Changes

- c9e75ce: Bump crate versions

## 8.0.0

### Major Changes

- 4574a70: Update swc_core to v8.0.1

## 7.0.3

### Patch Changes

- f3cea5f: Bump versions

## 7.0.2

### Patch Changes

- a73664c: Update swc_core to v6.0.2

## 7.0.1

### Patch Changes

- 4ff3b22: Move formatjs plugin to official plugin repository

## 7.0.0

### Major Changes

- 4ad7f56: Update swc_core to v5

## 6.0.0

### Major Changes

- ba13397: Update swc_core to v4

## 5.0.1

### Patch Changes

- 0508b6d: Update swc_core to v3

## 5.0.0

### Major Changes

- f5e393d: Make it configurable from Rust code

## 4.0.3

### Patch Changes

- cd5ad2a: Update swc_core to 1.0

## 4.0.2

### Patch Changes

- 20162c8: Update swc_core to v0.106.0

## 4.0.1

### Patch Changes

- 04548e2: Update swc_core to 0.103.x

## 4.0.0

### Major Changes

- f8e5fd0: Update swc_core to 0.102.x

## 3.0.13

### Patch Changes

- 7d17e25: Update swc_core to v0.101.x

## 3.0.12

### Patch Changes

- c3f0459: Update sourcemap

## 3.0.11

### Patch Changes

- 7391419: Update swc_core to v0.100.0

## 3.0.10

### Patch Changes

- 9c28afb: Update swc_core to 0.99.x (@swc/core 1.7.0)

## 3.0.9

### Patch Changes

- 7830879: Fix filename handling for Windows

## 3.0.8

### Patch Changes

- af25741: Update swc_core to 0.96.0

## 3.0.7

### Patch Changes

- 41a8f56: Update swc_core to v0.95.x

## 3.0.6

### Patch Changes

- fc30490: Update swc_core to v0.93.0

## 3.0.5

### Patch Changes

- 016c13b: Fix transform not applying to css calls inside of functions

## 3.0.4

### Patch Changes

- 0f38844: Publish all chanages

## 3.0.3

### Patch Changes

- 1cc9eda: Update dependencies

## 3.0.2

### Patch Changes

- 247cca6: Update rustc to 'nightly-2024-04-16'

## 3.0.1

### Patch Changes

- 876bbce: Update swc_core to 0.92.x

## 3.0.0

### Major Changes

- 8e91d39: Update swc_core to 0.91.x

## 2.5.124

### Patch Changes

- f4df366: Update swc_core

## 2.5.123

### Patch Changes

- c88b22b: Align package metadata

## 2.5.122

### Patch Changes

- a3cc4fb: Organize pacakge metadata

## 2.5.121

### Patch Changes

- e9e78ef: Update swc crates

## 2.5.120

### Patch Changes

- 6096d6d: Fix plugin version schema issue

## 2.5.119

### Patch Changes

- 37d3aaf: Depend on the swc download counter package

## 2.5.118

### Patch Changes

- 096d823: Strip line comments correctly

## 2.5.117

### Patch Changes

- 8bd92c7: swc_core 0.90.x

## 2.5.116

### Patch Changes

- 47db290: Fix string escaping issue

## 2.5.115

### Patch Changes

- 906b5dd: Fix panic when trying to unwrap None on setting the context for a function name

## 2.5.114

### Patch Changes

- 4ef0b7f: Add changelog to the readme

## 2.5.113

### Patch Changes

- 4e72680: swc_core@0.88.0

## 2.5.112

### Patch Changes

- 16bb4d8: swc_core@0.82.x

---
_Source: https://npm.io/package/@swc/plugin-emotion · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
