Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.