Adding Emotion
Installing bud.js dependencies
To get started with Emotion, install the @roots/bud-emotion extension to your project along with a compatible compiler:
We recommend using @roots/bud-swc:
- npm
- Yarn
- pnpm
npm install @roots/bud-swc @roots/bud-emotion --save-dev
yarn add @roots/bud-swc @roots/bud-emotion --dev
pnpm add @roots/bud-swc @roots/bud-emotion --save-dev
Installing production dependencies
Emotion requires the several packages to be installed in your project.
We will try and resolve them for you but it is a good idea to install them as explicit dependencies:
- npm
- Yarn
- pnpm
npm install @emotion/css @emotion/react @emotion/styled --save
yarn add @emotion/css @emotion/react @emotion/styled
pnpm add @emotion/css @emotion/react @emotion/styled
See the Emotion documentation for more information.