Color mode transition #6095
Answered
by
hugobqd
rikusen0335
asked this question in
Q&A
-
As title says, I couldn't finally find a solution. I found this and tried: import { ChakraProvider, extendTheme } from '@chakra-ui/react'
const theme = extendTheme({
body: {
transitionProperty: 'all',
transitionDuration: 'normal',
},
})
function App({ Component, pageProps: { session, ...pageProps } }: AppProps) {
return (
<ChakraProvider theme={theme}>
<Component {...pageProps} />
</ChakraProvider>
)
} but it seems not working as I expected. Please give me an idea about this. Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
hugobqd
May 25, 2022
Replies: 1 comment 10 replies
-
Hi! const theme = extendTheme({
styles: {
global: {
body: {
transitionProperty: "all",
transitionDuration: "normal",
},
},
},
}); But note that there are already |
Beta Was this translation helpful? Give feedback.
10 replies
Answer selected by
rikusen0335
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
There is no 'body' key in the theme object, it should be written in theme.styles.global like that:
But note that there are already
transition-property: background-color
&transition-duration: var(--chakra-transition-duration-normal)
by default on the body.