4.1.0 • Published 2 years ago

gatsby-plugin-material-ui v4.1.0

Weekly downloads
27,793
License
MIT
Repository
github
Last release
2 years ago

gatsby-plugin-material-ui

A Gatsby plugin for @material-ui with built-in server-side rendering support.

This is the plugin for Material-UI v5 (emotion). The plugin for v4 can be found here.

Install

npm install gatsby-plugin-material-ui@next @emotion/react

Theme vs. Plugin

  • gatsby-plugin-material-ui solves FOUC, auto prefixing and minification.
  • gatsby-theme-material-ui uses the plugin under the hood, adds web fonts, meta-viewport, CSS baseline and mui theme support and has material ui styled gatsby link components

How to use

The default options should be enough to cover the most common use cases.

// gatsby-config.js

module.exports = {
  plugins: [`gatsby-plugin-material-ui`],
};

Advanced

You can use the pathToEmotionCacheProps option for low level customization of how styles get inserted by emotion.

// gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-material-ui`,
      options: {
        pathToEmotionCacheProps: `src/emotion-cache-props`,
      },
    },
  ],
};
// src/emotion-cache-props.js
const emotionCacheProps = {
  key: `xyz`,
  nonce: `XXXYYYZZZ`
};

export default emotionCacheProps;

Examples

You can find an official integration example of this plugin on the Material-UI site, then you can pick one of the Page Layout Examples.

If you want to save time with a more opinionated solution. You can start with a premade theme.

@storycopter/gatsby-starter-storycoptergatsby-theme-sky-lite-masternuven-code-editorgatsby-typescript-material-ui-starter@rodriguesmyron/gatsby-theme-podcast@everything-registry/sub-chunk-1722gatsby-theme-affiliategatsby-theme-aoigatsby-theme-atom-servicegatsby-theme-auth-appgatsby-theme-basic-material-uigatsby-theme-blog-material-clarissegatsby-theme-blog-startergatsby-theme-blog-oceangatsby-material-typescript-startergatsby-shared-uigatsby-theme-landing-componentsgatsby-theme-material-bloggatsby-theme-material-foundrygatsby-theme-material-uigatsby-theme-flora-websitegatsby-theme-edithgatsby-theme-q3gatsby-affiliate-themegatsby-theme-use-shopping-cartgatsby-theme-spudnikgatsby-theme-stripe-basegatsby-theme-stripe-storefrontgatsby-theme-stripe-subscriptiongatsby-theme-sky-litegatsby-theme-portfolio-starter@mlent/gatsby-theme-help-center@lambdacurry/gatsby-theme@robinguan/gatsby-mdx-mui-theme@positibelabs/gatsby-theme-positibe-muihemingway-cli@storycopter/idoc@storycopter/storycopter-gatsby-starter@tidyiq/gatsby-core@tacogator/gatsby-theme-blog-material-clarisseawesome-material-ui-starter@committed/gatsby-theme-docs@commitd/gatsby-theme-docs@arcblock/gatsby-config@arcblock/gatsby-theme-docs@arcblock/gatsby-theme-www@brikl/gatsby-theme-brikl-store@cross.team/gatsby-theme-material-ui@cs125/gatsby-theme-cs125@xops.net/gatsby-openrpc-theme@zalastax/nolb-gatsby-plugin-mdocketifydaudr-blog@devular/gatsby-theme-help-centerem-docs-engine@gatsby-themes/mui@eshlox/gatsby-theme-axii@etclabscore/gatsby-theme-pristine@greatgatsbyjs/gatsby-theme-ggt-material-ui-blogflora-website@jorsek/gatsby-theme-easydita-core
4.1.0

2 years ago

4.0.3

3 years ago

4.0.2

3 years ago

4.0.1

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.10

4 years ago

2.1.9

4 years ago

2.1.8

4 years ago

2.1.7

4 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

2.0.0-beta.2

5 years ago

2.0.0-beta.1

5 years ago

1.2.5

5 years ago

2.0.0-beta.0

5 years ago

2.0.0-alpha.6

5 years ago

2.0.0-alpha.5

5 years ago

2.0.0-alpha.4

5 years ago

1.2.4

5 years ago

2.0.0-alpha.3

5 years ago

1.2.3

5 years ago

2.0.0-alpha.2

5 years ago

1.2.2

5 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.0

7 years ago