Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persisting the color mode #494

Open
sduduzog opened this issue Oct 21, 2021 · 0 comments
Open

Persisting the color mode #494

sduduzog opened this issue Oct 21, 2021 · 0 comments

Comments

@sduduzog
Copy link

Is your feature request related to a problem? Please describe.
After switching the color mode from light to dark, refreshing the page lands me back on dark mode. Not only that but the system currently is set to be dark mode but there is no way currently to get that automatically set

Describe the solution you'd like
Color mode should be persisted so that when I leave the site and come back, the color mode is persisted and I don't have to toggle it again. It should also auto detect system settings for setting its default color mode.

Describe alternatives you've considered
So far none...

Additional context
Tailwind has two themes modes, one listens to systems settings and the other is dependant on a class setting, which can be toggled programmatically. https://vueuse.org/core/usedark/ is a utility that's useful for controlling this. I haven't checked if the React variation of this library actually supports this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant