https://github.com/justjavac/is-dark-theme
Detect if the user has requested the system use a light or dark color theme
https://github.com/justjavac/is-dark-theme
css dark-theme detect light-theme media query them
Last synced: 5 months ago
JSON representation
Detect if the user has requested the system use a light or dark color theme
- Host: GitHub
- URL: https://github.com/justjavac/is-dark-theme
- Owner: justjavac
- License: mit
- Created: 2019-07-04T09:55:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-06T06:39:37.000Z (about 2 years ago)
- Last Synced: 2024-08-09T10:02:09.233Z (11 months ago)
- Topics: css, dark-theme, detect, light-theme, media, query, them
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# is-dark-theme
> Detect if the user has requested the system use a light or dark color theme.
[](https://nodei.co/npm/is-dark-theme/)
[](https://travis-ci.com/justjavac/is-dark-theme)
[](https://www.npmjs.com/package/is-dark-theme)
[](https://npmcharts.com/compare/is-dark-theme?minimal=true)
[](https://packagephobia.now.sh/result?p=is-dark-theme)## Installation
Install the package using `npm` or `yarn`.
**use npm**:
```bash
npm install is-dark-theme
```or **use yarn**:
```bash
yarn add is-dark-theme
```## Usage
```js
import isDarkTheme from 'is-dark-theme'isDarkTheme() // true | false
```### Credits
- [justjavac](https://github.com/justjavac)
### License
is-dark-theme is released under the MIT License. See the bundled [LICENSE](./LICENSE) file for details.