A provider component to provide options to emotion and allow theming


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
Minified + gzip package size for @emotion/provider in KB



A React component to provide a theme to child components


yarn add @emotion/provider


/** @jsx jsx */
import { jsx } from '@emotion/jsx'
import styled from '@emotion/styled'
import * as React from 'react'
import ThemeProvider from '@emotion/provider'

let SomeParagraph = styled.p`
  color: ${props => props.theme.primaryColor};

class SomeComponent extends React.Component {
  constructor(props) {
    this.state = {
      theme: {
        primaryColor: 'hotpink'
  render() {
    return (
      <ThemeProvider theme={this.state.theme}>
        <h1 css={theme => ({ color: theme.primaryColor })}>some heading</h1>
        <SomeParagraph>some text</SomeParagraph>

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.