{"id":15984258,"url":"https://github.com/uiwjs/react-use-colorscheme","last_synced_at":"2025-03-18T00:31:18.382Z","repository":{"id":187808592,"uuid":"677603424","full_name":"uiwjs/react-use-colorscheme","owner":"uiwjs","description":"useColorScheme() provides access to the devices color scheme.","archived":false,"fork":false,"pushed_at":"2024-01-25T05:26:27.000Z","size":3487,"stargazers_count":7,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-17T12:39:57.706Z","etag":null,"topics":["colorscheme","hooks","react","reactjs"],"latest_commit_sha":null,"homepage":"https://uiwjs.github.io/react-use-colorscheme/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uiwjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["jaywcjlove"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"custom":null}},"created_at":"2023-08-12T03:07:02.000Z","updated_at":"2024-03-25T08:09:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"974a09a0-f736-45d1-827c-a95c6f9e079b","html_url":"https://github.com/uiwjs/react-use-colorscheme","commit_stats":null,"previous_names":["uiwjs/react-use-colorscheme"],"tags_count":0,"template":false,"template_full_name":"uiwjs/react-monorepo-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiwjs%2Freact-use-colorscheme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiwjs%2Freact-use-colorscheme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiwjs%2Freact-use-colorscheme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiwjs%2Freact-use-colorscheme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uiwjs","download_url":"https://codeload.github.com/uiwjs/react-use-colorscheme/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221582599,"owners_count":16847396,"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","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":["colorscheme","hooks","react","reactjs"],"created_at":"2024-10-08T02:05:49.308Z","updated_at":"2024-10-27T16:24:18.766Z","avatar_url":"https://github.com/uiwjs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/jaywcjlove"],"categories":[],"sub_categories":[],"readme":"React useColorScheme() Hook\n===\n\n[![Build \u0026 Deploy](https://github.com/uiwjs/react-use-colorscheme/actions/workflows/ci.yml/badge.svg)](https://github.com/uiwjs/react-use-colorscheme/actions/workflows/ci.yml)\n[![Coverage Status](https://uiwjs.github.io/react-use-colorscheme/badges.svg)](https://uiwjs.github.io/react-use-colorscheme/coverage/lcov-report/)\n[![NPM Version](https://img.shields.io/npm/v/@uiw/react-use-colorscheme.svg)](https://www.npmjs.com/package/@uiw/react-use-colorscheme)\n[![react@^18](https://shields.io/badge/react-^18-green?style=flat\u0026logo=react)](https://github.com/facebook/react/releases)\n\n`useColorScheme()` is a tiny, zero-dependency, SSR hook for responding to devices color scheme changes.\n\n## Quick Start\n\n```bash\nnpm install @uiw/react-use-colorscheme\n```\n\n## Using\n\n```jsx mdx:preview\nimport React from \"react\";\nimport { useColorScheme } from '@uiw/react-use-colorscheme';\n\nexport default function App() {\n  const colorScheme = useColorScheme();\n  return (\n    \u003cdiv\u003e\n      \u003ch1 style={{ margin: 0 }}\u003euseColorScheme\u003c/h1\u003e\n      \u003cdiv\u003e{colorScheme === 'dark' ? '🌒 dark' : '🌞 light'}\u003c/div\u003e\n      \u003cp\u003eTest by setting light and dark themes in your OS\u003c/p\u003e\n      \u003cimg style={{ maxWidth: 520 }} src=\"https://github.com/uiwjs/react-use-online/assets/1680273/38090578-258c-496d-afdb-0493677e12f9\" /\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n## Related\n\n- [useOnline](https://github.com/uiwjs/react-use-online) `useOnline` is a tiny, zero-dependency hook for responding to online/offline changes.\n\n## Contributors\n\nAs always, thanks to our amazing contributors!\n\n\u003ca href=\"https://github.com/uiwjs/react-use-colorscheme/graphs/contributors\"\u003e\n  \u003cimg src=\"https://uiwjs.github.io/react-use-colorscheme/CONTRIBUTORS.svg\" /\u003e\n\u003c/a\u003e\n\nMade with [contributors](https://github.com/jaywcjlove/github-action-contributors).\n\n## License\n\nLicensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuiwjs%2Freact-use-colorscheme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuiwjs%2Freact-use-colorscheme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuiwjs%2Freact-use-colorscheme/lists"}