@emotion/react (11.14.0)
Published 2026-02-24 13:49:15 +00:00 by atheaadmin
Installation
@emotion:registry=npm install @emotion/react@11.14.0"@emotion/react": "11.14.0"About this package
@emotion/react
Simple styling in React.
Install
yarn add @emotion/react
Usage
/** @jsx jsx */
import { jsx, css, Global, ClassNames } from '@emotion/react'
render(
<div css={{ color: 'hotpink' }}>
<div
css={css`
color: green;
`}
/>
<Global
styles={{
body: {
margin: 0,
padding: 0
}
}}
/>
<ClassNames>
{({ css, cx }) => (
<div
className={cx(
'some-class',
css`
color: yellow;
`
)}
/>
)}
</ClassNames>
</div>
)
More documentation is available at https://emotion.sh.
Dependencies
Dependencies
| ID | Version |
|---|---|
| @babel/runtime | ^7.18.3 |
| @emotion/babel-plugin | ^11.13.5 |
| @emotion/cache | ^11.14.0 |
| @emotion/serialize | ^1.3.3 |
| @emotion/use-insertion-effect-with-fallbacks | ^1.2.0 |
| @emotion/utils | ^1.4.2 |
| @emotion/weak-memoize | ^0.4.0 |
| hoist-non-react-statics | ^3.3.1 |
Development Dependencies
| ID | Version |
|---|---|
| @definitelytyped/dtslint | 0.0.112 |
| @emotion/css | 11.13.5 |
| @emotion/css-prettifier | 1.2.0 |
| @emotion/server | 11.11.0 |
| @emotion/styled | 11.14.0 |
| @types/hoist-non-react-statics | ^3.3.5 |
| html-tag-names | ^1.1.2 |
| react | 16.14.0 |
| svg-tag-names | ^1.1.1 |
| typescript | ^5.4.5 |
Peer Dependencies
| ID | Version |
|---|---|
| react | >=16.8.0 |