emotion

style as a function of state

Github星跟踪图

Need support upgrading to Emotion 10? See the migration guide

Backers on Open Collective Sponsors on Open Collective npm version
Build Status
codecov
core size
core gzip size
react size
react gzip size
slack
spectrum

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/core
/** @jsx jsx */
import { jsx } from '@emotion/core'

let SomeComponent = props => {
  return (
    <div
      css={{
        color: 'hotpink'
      }}
      {...props}
    />
  )
}

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]











主要指标

概览
名称与所有者emotion-js/emotion
主编程语言JavaScript
编程语言JavaScript (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2017-05-27 04:23:45
推送于2025-01-13 07:18:15
最后一次提交
发布数1305
最新版本名称@emotion/use-insertion-effect-with-fallbacks@1.2.0 (发布于 2024-12-09 08:43:29)
第一版名称v0.0.2 (发布于 2017-05-27 23:33:49)
用户参与
星数17.7k
关注者数95
派生数1.1k
提交数1.9k
已启用问题?
问题数1723
打开的问题数291
拉请求数1096
打开的拉请求数64
关闭的拉请求数286
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?