
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@chakra-xui/gatsby-plugin
Advanced tools
Gatsby plugin for adding Chakra xui
⚡ To use Chakra xui in your Gatsby site, you need to install the plugin and its peer dependencies.
npm i @chakra-xui/gatsby-plugin @chakra-xui/react @emotion/react @emotion/styled framer-motion
# or
yarn add @chakra-xui/gatsby-plugin @chakra-xui/react @emotion/react @emotion/styled framer-motion
@chakra-xui/gatsby-plugin as a plugin in your Gatsby config.// gatsby-config.js
module.exports = {
plugins: ["@chakra-xui/gatsby-plugin"],
}
// src/pages/index.js
import React from "react"
import { Box, Text } from "@chakra-xui/react"
function IndexPage() {
return (
<Box p={8}>
<Text fontSize="xl">Hello World</Text>
</Box>
)
}
export default IndexPage
By default, this plugin adds a couple of context providers to make all components work correctly.
localStoragetheme.styles.global<ThemeProvider theme={theme}>
<ColorModeProvider>
<GlobalStyle />
{isResettingCSS && <CSSReset />}
<PortalManager zIndex={portalZIndex}>{element}</PortalManager>
</ColorModeProvider>
</ThemeProvider>
You can disable either of these with Gatsby options:
// gatsby-config.js
module.exports = {
plugins: [
{
resolve: "@chakra-xui/gatsby-plugin",
options: {
/**
* @property {boolean} [isResettingCSS=true]
* if `false`, this plugin will not use `<CSSReset />
*/
isResettingCSS: true,
/**
* @property {boolean} [isUsingColorMode=true]
* if `false`, this plugin will not use <ColorModeProvider />
*/
isUsingColorMode: true,
/**
* @property {number} [portalZIndex=40]
* The z-index to apply to all portal nodes. This is useful
* if your app uses a lot z-index to position elements.
*/
portalZIndex: 40,
},
},
],
}
To use customize the theme in your Gatsby site, you can shadow the plugin's
src/@chakra-xui/gatsby-plugin/theme.js file with your own theme:
// src/@chakra-xui/gatsby-plugin/theme.js
const theme = {}
export default theme
You can learn more about custom theme at Chakra xui's documentation.
By default, Chakra provides a sensible default theme inspired by Tailwind CSS.
FAQs
Drop-in Chakra xui support for Gatsby sites
The npm package @chakra-xui/gatsby-plugin receives a total of 6 weekly downloads. As such, @chakra-xui/gatsby-plugin popularity was classified as not popular.
We found that @chakra-xui/gatsby-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.