Official Plugin
View plugin on GitHubgatsby-plugin-emotion
Provide support for using the css-in-js library Emotion including server side rendering.
This plugin supports Emotion v10+
Older versions should use versions of this plugin which support Emotion 8 and 9. Check out the Emotion 10 migration guide for more information on how to upgrade.
Install
npm install --save gatsby-plugin-emotion @emotion/core @emotion/styled
How to use
Add the plugin to your gatsby-config.js
.
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-emotion`,
options: {
// Accepts all options defined by `babel-plugin-emotion` plugin.
},
},
],
}
Edit this page on GitHub