Chakra 1.6.12 now features color mode issues (now dark by default, even though docs promise light by default. Also, overrides appear not to work)
See original GitHub issueDescription
Docs tell me that Chakra will be light color mode: https://chakra-ui.com/docs/features/color-mode#setup, but the default is your system color mode. Overrides appear to not work
Link to Reproduction
https://codesandbox.io/s/dank-cloud-rymzh?file=/src/App.tsx
Steps to reproduce
- Install latest Chakra (1.6.12)
- Set your system color mode to ‘dark’
- Wrap something in a
<ChakraProvider/>
- Notice that it is all black now, instead of light:
Even if you set:
const config = {
initialColorMode: "light",
useSystemColorMode: false,
}
this now does not override the color mode. It always takes your system color mode
Chakra UI Version
1.6.12
Browser
All
Operating System
- macOS
- Windows
- Linux
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:32
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Color Mode - Chakra UI
Color Mode. Chakra UI comes with built-in support for managing color mode in your apps. By default, most of Chakra's components are dark...
Read more >Learn Chakra-ui by building a Todo Application with Local ...
Learn Chakra -ui by building a Todo Application with Local Storage, Dark Mode enabled.In this video, we will learn # chakra -ui by...
Read more >Chakra UI Next Js - Color Mode Toggle takes 2 clicks on ...
Ie, text goes from black to light, but background stays from light to light, resulting in a screen with both light background and...
Read more >Review of Chakra UI - Bits and Pieces
Chakra UI is a modern component library for React created by Segun ... the styles of components switching between dark and light theme...
Read more >Dark-Mode Support with Chakra-UI and Next.js - gsdev
Chakra ships with dark-mode support built-in, even though we haven't taken a single step towards it, your boilerplate sandbox already has ...
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
For people who can’t wait for the next release for some reason, I temporarily solved it like this:
yep, same issues here, worked around it for now by explicitly wrapping the app with a
<LightMode>
(directly after the provider) - since I only want light mode for right nowEDIT: actually that led to other issues, the real “fix” I’m applying now is to just resolve
@chakra-ui/color-mode
to a version smaller than in my package.json