react-use-color-mode
v1.3.0
Published
A react hook to detect dark or light mode of system
Downloads
5
Maintainers
Readme
react-use-color-mode 🌗
A react hook to detect dark or light mode of system
Install
npm install --save react-use-color-mode
Usage
import * as React from 'react';
import { useColorMode } from 'react-use-color-mode';
const Example = () => {
const colorMode = useColorMode();
return (
<div>
<h2>Your color Mode is {colorMode}</h2>
</div>
);
};
License
MIT © JasonHeylon