Content-Length: 37925 | pFad | https://theme-ui.com/getting-started/gatsby

Getting Started with Gatsby – Theme UI
Skip to content
Theme UI
GitHub

Getting Started with Gatsby

To use Theme UI with Gatsby, install and use gatsby-plugin-theme-ui.

npm i theme-ui @theme-ui/mdx gatsby-plugin-theme-ui @emotion/react @mdx-js/react

Add the plugin to your gatsby-config.js.

module.exports = {
plugins: ['gatsby-plugin-theme-ui'],
}

Create a theme file located at src/gatsby-plugin-theme-ui/index.js.

// example theme file
const theme = {
colors: {
text: '#000',
background: '#fff',
},
}
export default theme

With gatsby-plugin-theme-ui, there is no need to manually use the ThemeUIProvider component. Use the sx prop, color modes, and other features just as you would with any other application.

For more information, see the documentation for gatsby-plugin-theme-ui.

Edit the page on GitHub
Previous:
Getting Started
Next:
Theming








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://theme-ui.com/getting-started/gatsby

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy