Skip to content

michaelnjuguna/theme-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Theme detector

Get the theme of the browser also works in ionic apps

Install

Via npm

npm install theme-detector

Via yarn

yarn add theme-detector

Usage

Once the package is installed you use the import approach

import checkTheme from 'theme-detector';

console.log(checkTheme());
// If browser theme is dark it logs 'dark'
// If browser theme is light it logs 'light'

Support

If you like this project, You can support me with starring ⭐ this repository.

License

MIT

About

An npm package to detect the theme of a browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published