Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-06T06:39:37.000Z (over 1 year ago)
- Last Synced: 2024-08-09T10:02:09.233Z (6 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.
[![npm package](https://nodei.co/npm/is-dark-theme.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/is-dark-theme/)
[![Build Status](https://travis-ci.com/justjavac/is-dark-theme.svg?branch=master)](https://travis-ci.com/justjavac/is-dark-theme)
[![NPM version](https://img.shields.io/npm/v/is-dark-theme.svg)](https://www.npmjs.com/package/is-dark-theme)
[![NPM Downloads](https://img.shields.io/npm/dm/is-dark-theme.svg?style=flat)](https://npmcharts.com/compare/is-dark-theme?minimal=true)
[![Install Size](https://packagephobia.now.sh/badge?p=is-dark-theme)](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.