When I implement `ColorModeScript` set to `useSystemColorMode: true` and `initialColorMode: "dark"` it does not seem to be working.
See original GitHub issueDescription
When I implement ColorModeScript
set to useSystemColorMode: true
and initialColorMode: "dark"
it does not seem to be working.
Link to Reproduction
https://github.com/jcstein/buildmarket-lol
Steps to reproduce
- Go to https://github.com/jcstein/buildmarket-lol
- Clone the repo
- Run
yarn
- Run
yarn start
- See error
Chakra UI Version
2.2.1
Browser
Brave/Safari/Firefox
Operating System
- macOS
- Windows
- Linux
Additional Information
Issue Analytics
- State:
- Created a year ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Color Mode - Chakra UI
Add the ColorModeScript to your application, and set the initial color mode your application should start with to either light , dark or...
Read more >Chakra UI color mode changes on page refresh, because of ...
I'm running NextJS with Chakra UI and the problem is when useSystemColorMode is set to true ...
Read more >Color Mode - Chakra UI
When you use the ChakraProvider at the root of your app, you can automatically use color mode in your apps. By default, most...
Read more >What is Dark Mode for Email and Does it Affect Rendering?
Dark mode is a setting that shifts an interface's color palette to display content in high contrast using dark background colors and light...
Read more >@chakra-ui/provider - npm
If you are not sure why you are using it, please use @chakra-ui/react ... useSystemColorMode: false, // or true initialColorMode: "light", ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jcstein
@chakra-ui/color-mode
seems to have changed the behavior of the initial color in v2.0.0 https://github.com/chakra-ui/chakra-ui/releases/tag/%40chakra-ui%2Fcolor-mode%402.0.0Therefore, if you’d like to use the system color as the default color, fix theme as follows.
And there is a bug in https://github.com/jcstein/buildmarket-lol. You need to pass a custom theme to
ChakraProvider
instead of the default theme.thank you so much! @itkrt2y