# @ant-design/use-emotion-css

> A gadget that combines emotion and antd token

Latest version **1.0.4** (published 2022-12-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ant-design/use-emotion-css
pnpm add @ant-design/use-emotion-css
yarn add @ant-design/use-emotion-css
bun add @ant-design/use-emotion-css
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-12-05 |
| First published | 2022-11-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Maintainers | madccc, afc163, vthinkxie, zombiej, chenshuai2144, vagusx, wynterding, yutingzhao1991, arvinxx, rdmclin2 |
| Keywords | antd, emotion, cssinjs |

## Links

- npm: https://www.npmjs.com/package/@ant-design/use-emotion-css
- Repository: https://github.com/ant-design/use-emotion-css
- Homepage: https://github.com/ant-design/use-emotion-css#readme
- Issues: https://github.com/ant-design/use-emotion-css/issues
- npm.io page: https://npm.io/package/@ant-design/use-emotion-css

## Dependencies (1)

- [@emotion/css](https://npm.io/package/@emotion/css.md) ^11.10.5

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-12-05
- 1.0.3 — 2022-12-05
- 1.0.2 — 2022-11-21
- 1.0.1 — 2022-11-21
- 1.0.0 — 2022-11-20

## README

# use-emotion-css

A gadget that combines emotion and antd token

```jsx
import { useEmotionCss } from '@ant-design/use-emotion-css';
import React from 'react';

export default () => {
  const className = useEmotionCss(({ token }) => {
    return {
      color: token.colorPrimary,
      display: 'flex',
      justifyContent: 'center',
      gap: 24,
      padding: 24,
      flexDirection: 'column',
    };
  });
  const blockClassName = useEmotionCss(({ token }) => {
    return {
      backgroundColor: token.colorPrimary,
      width: 12,
      height: 12,
      borderRadius: 12,
    };
  });
  return (
    <div className={className}>
      <div
        style={{
          display: 'flex',
          alignItems: 'center',
          gap: 8,
        }}
      >
        <div className={blockClassName} />
        <span>Hello World</span>
      </div>
    </div>
  );
};
```

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