use-color-scheme
Detect user system color scheme with window.matchMedia API
Import
Source
Docs
Package
Usage
Hook uses use-media-query hook under the hood.
Hook relies on window.matchMedia()
API
and will always return light
if api is not available (e.g. during server side rendering).
Hook returns either dark
or light
value:
Your system color scheme is light
Feedback
Your feedback is most valuable contribution to the project, please share how you use Mantine, what features are missing and what is done good
Leave feedback