emotion
The Next Generation of CSS-in-JS.
Last updated 6 years ago by mitchellhamilton .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install emotion 
SYNC missed versions from official npm registry.

emotion

emotion

The Next Generation of CSS-in-JS

Backers on Open Collective Sponsors on Open Collective npm version Build Status codecov core size core gzip size react size react 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
import { css } from 'emotion'

const app = document.getElementById('root')
const myStyle = css`
  color: rebeccapurple;
`
app.classList.add(myStyle)

React with Optional Babel Plugin

npm install --save emotion react-emotion babel-plugin-emotion
import styled, { css } from 'react-emotion'

const Container = styled('div')`
  background: #333;
`
const myStyle = css`
  color: rebeccapurple;
`
const app = () => (
  <Container>
    <p className={myStyle}>Hello World</p>
  </Container>
)

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

Contributors

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

Backers

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

Sponsors

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

Current Tags

  • 11.0.0                                ...           latest (4 years ago)
  • 11.0.0-next.10                                ...           next (5 years ago)
  • 11.0.0-rc.0                                ...           rc (4 years ago)

144 Versions

  • 11.0.0                                ...           4 years ago
  • 11.0.0-rc.0                                ...           4 years ago
  • 11.0.0-next.10                                ...           5 years ago
  • 10.0.27                                ...           5 years ago
  • 11.0.0-next.8                                ...           5 years ago
  • 11.0.0-next.0                                ...           5 years ago
  • 10.0.23                                ...           5 years ago
  • 10.0.17                                ...           5 years ago
  • 10.0.14                                ...           5 years ago
  • 10.0.9                                ...           6 years ago
  • 10.0.8                                ...           6 years ago
  • 10.0.7                                ...           6 years ago
  • 10.0.6                                ...           6 years ago
  • 10.0.5                                ...           6 years ago
  • 10.0.4                                ...           6 years ago
  • 10.0.3                                ...           6 years ago
  • 10.0.2                                ...           6 years ago
  • 10.0.1                                ...           6 years ago
  • 10.0.0                                ...           6 years ago
  • 10.0.0-beta.13                                ...           6 years ago
  • 10.0.0-beta.12                                ...           6 years ago
  • 10.0.0-beta.11                                ...           6 years ago
  • 10.0.0-beta.10                                ...           6 years ago
  • 10.0.0-beta.9                                ...           6 years ago
  • 10.0.0-beta.8                                ...           6 years ago
  • 10.0.0-beta.7                                ...           6 years ago
  • 10.0.0-beta.6                                ...           6 years ago
  • 10.0.0-beta.5                                ...           6 years ago
  • 10.0.0-beta.4                                ...           6 years ago
  • 10.0.0-beta.3                                ...           6 years ago
  • 10.0.0-beta.2                                ...           6 years ago
  • 10.0.0-beta.1                                ...           6 years ago
  • 10.0.0-beta.0                                ...           6 years ago
  • 9.2.12                                ...           6 years ago
  • 9.2.11                                ...           6 years ago
  • 10.0.0-really-unsafe-please-do-not-use.2                                ...           6 years ago
  • 10.0.0-really-unsafe-please-do-not-use.1                                ...           6 years ago
  • 10.0.0-really-unsafe-please-do-not-use.0                                ...           6 years ago
  • 9.2.10                                ...           6 years ago
  • 9.2.9                                ...           6 years ago
  • 9.2.8                                ...           6 years ago
  • 9.2.6                                ...           6 years ago
  • 9.2.5                                ...           6 years ago
  • 9.2.4                                ...           6 years ago
  • 9.2.3                                ...           6 years ago
  • 9.2.1                                ...           6 years ago
  • 9.2.0                                ...           6 years ago
  • 9.1.3                                ...           7 years ago
  • 9.1.2                                ...           7 years ago
  • 9.1.1                                ...           7 years ago
  • 9.1.0                                ...           7 years ago
  • 9.0.2                                ...           7 years ago
  • 9.0.1                                ...           7 years ago
  • 9.0.0                                ...           7 years ago
  • 9.0.0-3                                ...           7 years ago
  • 9.0.0-2                                ...           7 years ago
  • 9.0.0-1                                ...           7 years ago
  • 9.0.0-0                                ...           7 years ago
  • 8.0.12                                ...           7 years ago
  • 8.0.11                                ...           7 years ago
  • 8.0.10                                ...           7 years ago
  • 8.0.9                                ...           7 years ago
  • 8.0.8                                ...           7 years ago
  • 8.0.7                                ...           7 years ago
  • 8.0.6                                ...           7 years ago
  • 8.0.5                                ...           7 years ago
  • 8.0.4                                ...           7 years ago
  • 8.0.3                                ...           7 years ago
  • 8.0.2                                ...           7 years ago
  • 8.0.2-12                                ...           7 years ago
  • 8.0.2-11                                ...           7 years ago
  • 8.0.2-10                                ...           7 years ago
  • 8.0.2-9                                ...           7 years ago
  • 8.0.2-8                                ...           7 years ago
  • 8.0.2-7                                ...           7 years ago
  • 8.0.2-6                                ...           7 years ago
  • 8.0.2-5                                ...           7 years ago
  • 8.0.2-4                                ...           7 years ago
  • 8.0.2-3                                ...           7 years ago
  • 8.0.2-2                                ...           7 years ago
  • 8.0.2-1                                ...           7 years ago
  • 8.0.2-0                                ...           7 years ago
  • 8.0.1-0                                ...           7 years ago
  • 8.0.0-0                                ...           7 years ago
  • 7.3.2                                ...           7 years ago
  • 7.3.1                                ...           7 years ago
  • 7.3.0                                ...           7 years ago
  • 7.2.2                                ...           7 years ago
  • 7.2.0                                ...           7 years ago
  • 7.1.1                                ...           7 years ago
  • 7.1.0                                ...           7 years ago
  • 7.0.13                                ...           7 years ago
  • 7.0.12                                ...           7 years ago
  • 7.0.11                                ...           7 years ago
  • 7.0.10                                ...           7 years ago
  • 7.0.9                                ...           7 years ago
  • 7.0.8                                ...           7 years ago
  • 7.0.7                                ...           7 years ago
  • 7.0.6                                ...           7 years ago
  • 7.0.5                                ...           7 years ago
  • 7.0.4                                ...           7 years ago
  • 7.0.3                                ...           7 years ago
  • 7.0.2                                ...           7 years ago
  • 7.0.1                                ...           7 years ago
  • 7.0.0                                ...           7 years ago
  • 6.0.3                                ...           7 years ago
  • 6.0.2                                ...           7 years ago
  • 6.0.1                                ...           7 years ago
  • 6.0.0                                ...           7 years ago
  • 5.2.1                                ...           7 years ago
  • 5.2.0                                ...           7 years ago
  • 5.1.4                                ...           7 years ago
  • 5.1.3                                ...           7 years ago
  • 5.1.2                                ...           7 years ago
  • 5.1.1                                ...           7 years ago
  • 5.1.0                                ...           7 years ago
  • 5.0.0                                ...           7 years ago
  • 4.1.6                                ...           7 years ago
  • 4.1.5                                ...           7 years ago
  • 4.1.4                                ...           7 years ago
  • 4.1.3                                ...           7 years ago
  • 4.1.2                                ...           7 years ago
  • 4.1.1                                ...           7 years ago
  • 4.1.0                                ...           7 years ago
  • 4.0.0                                ...           7 years ago
  • 3.0.3                                ...           7 years ago
  • 3.0.2                                ...           7 years ago
  • 3.0.1                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.6                                ...           7 years ago
  • 1.0.5                                ...           7 years ago
  • 1.0.4                                ...           7 years ago
  • 1.0.3                                ...           7 years ago
  • 1.0.2                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 0.0.7                                ...           7 years ago
  • 0.0.6                                ...           7 years ago
  • 0.0.5                                ...           7 years ago
  • 0.0.4                                ...           7 years ago
  • 0.0.3                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 1.0.0                                ...           8 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE