Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant