react-use-color-mode
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

react-use-color-mode 🌗

A react hook to detect dark or light mode of system

NPM JavaScript Style Guide

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

/react-use-color-mode/

    Package Sidebar

    Install

    npm i react-use-color-mode

    Weekly Downloads

    12

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    12.6 kB

    Total Files

    11

    Last publish

    Collaborators

    • jasonheylon