Closed iamkarshe closed 2 months ago
I guess we can use useMediaQuery
but I thought we can provide one abstract-level for Dark mode specific hook.
Kind of preferred-language we can have preferred-mode https://hooks.scriptkavi.com/docs/hooks/preferred-language
const mode = usePreferredScreenMode() // ['system-light', 'system-dark', 'light', 'dark']
Hi @iamkarshe , Makes sense. We can work on it. If possible, you can raise a pull request if you have the hook already available. Or I can do it when I get time.
Thanks for the suggestion.
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
Feature description
Using
useHasDarkMode
know if user has dark mode already being used in client side so we can directly apply dark theme variant on load.Some code which can help us in making this feature.
Knowing dark mode.
Keeping track of change.
Affected component/components
No response
Additional Context
No response
Before submitting