question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dark mode by default

See original GitHub issue

Description

How can i keep dark mode by default

Link to Reproduction

https://www.dsabyte.com

Steps to reproduce

  1. Go here when the website loads, the first white background appears then dark.

Chakra UI Version

latest

Browser

chrome

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

My theme config

import { extendTheme } from "@chakra-ui/react"

const config = {
  initialColorMode: "dark",
  useSystemColorMode: false,
}

const theme = extendTheme({ config })

export default theme

So, you can see that the dark mode is enabled by default, but it’s not appearing.

Users can only enable dark mode after clicking on the dark mode button.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
jeevansurendrancommented, Oct 24, 2021

@ats1999 one possible reason why this issue still exists for you is that at one point during development the chakra-ui set a flag in your local storage stating that the theme was light, you can maybe remove this flag and check if the website loads directly to the dark mode or not.

2reactions
primos63commented, Oct 23, 2021

It is set to Dark Mode, but you are experiencing an already known issue per the documentation

There are some solutions others have come up with. I cannot vouch for their effectiveness. Here’s one solution no-flash-chakra

Read more comments on GitHub >

github_iconTop Results From Across the Web

Browse in Dark mode or Dark theme - Google Chrome Help
System Default if you want to use Chrome in Dark theme when Battery Saver mode is turned on or your mobile device is...
Read more >
Default Dark Mode - Resource Packs - Minecraft - CurseForge
Default Dark Mode. The Dark Mode Resource Pack for Minecraft: Java Edition. This Resource Pack is a simple dark mode / dark theme...
Read more >
Blackout: How to Enable Dark Mode on Your Browser | PCMag
On an Android device, tap the three-dot menu at the bottom of the browser and select Settings > Appearance and choose Dark or...
Read more >
Why is dark mode not the default option? : r/UI_Design - Reddit
Dark mode is good for apps which are being used most frequently by users. For example, Reddit. It gives both the modes: dark...
Read more >
95% of People Prefer Dark over Light Mode - Hacker News
I personally like dark mode during night time, but almost always prefer light mode by default. There's just something about dark mode that ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found