-
Hello. I hope this is the right place to ask this type of question. I'm using @chakra-ui/react with Tailwind CSS and NextJS. I have set my background color to body {
background-color: black;
} But I don't see the black color being applied, I only see a white screen with the content. This is my app.js file: import { ChakraProvider } from '@chakra-ui/react'
import 'tailwindcss/tailwind.css'
import '../styles/globals.css' // file which sets the body's background-color to black
function MyApp({ Component, pageProps }) {
return (
<ChakraProvider>
<Component {...pageProps} />
</ChakraProvider>
)
}
export default MyApp I assume this is because of chakra's default theme? How would I disable it? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
The reason is that chakra UI has body-bg style to global in the default theme. You can override this with the following code
|
Beta Was this translation helpful? Give feedback.
-
How can you remove all of the default theme though? I have a project that already uses its own CSS and we are starting to integrate Chakra but it is messing up some layouts. If there's a way to import specific components from Chakra as well that would be beneficial. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
this is if u want to diable the theme
|
Beta Was this translation helpful? Give feedback.
-
I wasnt using any theming capabilities of so just setting |
Beta Was this translation helpful? Give feedback.
The reason is that chakra UI has body-bg style to global in the default theme. You can override this with the following code
https://codesandbox.io/s/zeta-heading-size-issue-forked-w4xn8?file=/src/index.js