color-scheme-hook
v3.7.2
Published
React hook to detect and toggle color scheme.
Downloads
32
Maintainers
Readme
Installation
npm install color-scheme-hook
Usage
import { useDarkMode, useLightMode } from "color-scheme-hook";
export default function MyReactComponent(){
const [isDarkMode, toggleColorScheme, resetPreference] = useDarkMode();
const [isLightMode, toggleColorScheme, resetPreference] = useLightMode();
}