{"id":22307713,"url":"https://github.com/redredgroup/react-browser-theme-detect","last_synced_at":"2025-10-19T18:48:02.180Z","repository":{"id":112747788,"uuid":"575931914","full_name":"REDREDGROUP/react-browser-theme-detect","owner":"REDREDGROUP","description":"You can import the current browser theme from the react.","archived":false,"fork":false,"pushed_at":"2022-12-08T16:22:36.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T01:27:15.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/REDREDGROUP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-08T16:13:52.000Z","updated_at":"2022-12-08T16:14:38.000Z","dependencies_parsed_at":"2023-09-13T22:55:22.346Z","dependency_job_id":null,"html_url":"https://github.com/REDREDGROUP/react-browser-theme-detect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/REDREDGROUP/react-browser-theme-detect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/REDREDGROUP%2Freact-browser-theme-detect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/REDREDGROUP%2Freact-browser-theme-detect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/REDREDGROUP%2Freact-browser-theme-detect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/REDREDGROUP%2Freact-browser-theme-detect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/REDREDGROUP","download_url":"https://codeload.github.com/REDREDGROUP/react-browser-theme-detect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/REDREDGROUP%2Freact-browser-theme-detect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267417664,"owners_count":24083839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T20:11:19.737Z","updated_at":"2025-10-19T18:48:02.045Z","avatar_url":"https://github.com/REDREDGROUP.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🪄 React Browser Theme Detect \n\n\n[![NPM](https://nodei.co/npm/react-browser-theme-detect.png)](https://www.npmjs.com/package/react-browser-theme-detect)\n\n\n# Usage\nAdd the dependency:\n\n## NPM\n```bash\nnpm install @redredgroup/react-browser-theme-detect\n```\n\n## Yarn\n```bash\nyarn add @redredgroup/react-browser-theme-detect\n```\n\n# Example\n\n\nImport the package:\n\n```js\nimport { isTheme, isThemeLight, isThemeDark } from \"@redredgroup/react-browser-theme-detect\";\n```\n\nReturns the String value for dark mode or light mode: \n```js\nconst themeString = isTheme();\n// Returns \"light\" or \"dark\"\n```\n\nWhen the Boolean value for dark mode detection is required,\n\n```js\nconst isDark = isThemeDark();\n// If it is in dark mode, return true or false\n```\n```js\nconst isLight = isThemeLight();\n// If it is in dark mode, return true or false\n```\n\n## 💡 Browser support\n\nThis package only works in browsers that natively support `@media (prefers-color-scheme)`, so it just returns `\"light\"` in unsupported browsers. [Current browser support](https://caniuse.com/#feat=prefers-color-scheme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredredgroup%2Freact-browser-theme-detect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredredgroup%2Freact-browser-theme-detect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredredgroup%2Freact-browser-theme-detect/lists"}