Detect if the user has requested the system use a light or dark color theme.
Install the package using npm
or yarn
.
use npm:
npm install is-dark-theme
or use yarn:
yarn add is-dark-theme
import isDarkTheme from 'is-dark-theme'
isDarkTheme() // true | false
is-dark-theme is released under the MIT License. See the bundled LICENSE file for details.