{"_id":"@alikia/dark-theme-hook","_rev":"2-f60962680239dee36032c806250c1b59","name":"@alikia/dark-theme-hook","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@alikia/dark-theme-hook","version":"1.0.0","keywords":["dark","theme","darktheme","darkmode","hook","react","reacthook"],"author":{"url":"https://alikia2x.com","name":"alikia2x","email":"alikia2x@outlook.com"},"license":"MIT","_id":"@alikia/dark-theme-hook@1.0.0","maintainers":[{"name":"alikia2x","email":"ziwen243@outlook.com"}],"homepage":"https://github.com/alikia2x/useDarkTheme#readme","bugs":{"url":"https://github.com/alikia2x/useDarkTheme/issues"},"dist":{"shasum":"3146d1a73256ce9b64062a99509bceca7ae7ce5c","tarball":"https://registry.npmjs.org/@alikia/dark-theme-hook/-/dark-theme-hook-1.0.0.tgz","fileCount":4,"integrity":"sha512-eGsxAPU8IKvPhj0TDzaN3Fr7muPVSVeL5xk4QglEHkJAfwfqQ8OFb+I0NNt3Yk9vzc6wQnkjtfNP5UFysWB8eQ==","signatures":[{"sig":"MEQCIGrA5LbwuKm9o7JXxk1ssxKJLrFGE1E2w9ewX9eJhNwuAiAFuRAndUi3BE4wR6fpwyK25Hmu7xRTvR6F89bkgaxmsQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2731},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","gitHead":"54365197113b5a05623a971e6318f16a3b3c79bf","private":false,"_npmUser":{"name":"alikia2x","email":"ziwen243@outlook.com"},"repository":{"url":"git+https://github.com/alikia2x/useDarkTheme.git","type":"git"},"_npmVersion":"10.8.1","description":"A React hook that responds to prefers-color-scheme","directories":{},"_nodeVersion":"22.4.0","dependencies":{"react":"^18.3.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/react":"^18.3.3"},"_npmOperationalInternal":{"tmp":"tmp/dark-theme-hook_1.0.0_1723183923921_0.8221634113565044","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@alikia/dark-theme-hook","version":"1.0.1","keywords":["dark","theme","darktheme","darkmode","hook","react","reacthook"],"author":{"url":"https://alikia2x.com","name":"alikia2x","email":"alikia2x@outlook.com"},"license":"MIT","_id":"@alikia/dark-theme-hook@1.0.1","maintainers":[{"name":"alikia2x","email":"ziwen243@outlook.com"}],"homepage":"https://github.com/alikia2x/useDarkTheme#readme","bugs":{"url":"https://github.com/alikia2x/useDarkTheme/issues"},"dist":{"shasum":"c9e93312f1397b216d46998a6fd37b02563a86a1","tarball":"https://registry.npmjs.org/@alikia/dark-theme-hook/-/dark-theme-hook-1.0.1.tgz","fileCount":4,"integrity":"sha512-zVglPkwD+dvdAMTI3YISMIoOohflRhStMzsMKr44JCoUCXFGx6evWkfM+20TR2eYNIy3OlLwZ/feWmDCkeNTGg==","signatures":[{"sig":"MEUCIDAesix8Cx8zezmqfI0ci/C7Vd1xMO8XdVl1oaz5quxCAiEAlpjZjr8VJ+CPkYkVZzn6gDp3OXJ4lMWcyP6zIZ8UKao=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2734},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","gitHead":"a94d63a7fbcb78609de3dd380f583fdb8c493a43","private":false,"_npmUser":{"name":"alikia2x","email":"ziwen243@outlook.com"},"repository":{"url":"git+https://github.com/alikia2x/useDarkTheme.git","type":"git"},"_npmVersion":"10.8.1","description":"A React hook that responds to prefers-color-scheme","directories":{},"_nodeVersion":"22.4.0","dependencies":{"react":"^18.3.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/react":"^18.3.3"},"_npmOperationalInternal":{"tmp":"tmp/dark-theme-hook_1.0.1_1723184109271_0.12927859998628466","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@alikia/dark-theme-hook","version":"1.0.2","description":"A React hook that responds to prefers-color-scheme","private":false,"type":"module","main":"lib/index.js","types":"lib/index.d.ts","author":{"name":"alikia2x","email":"alikia2x@outlook.com","url":"https://alikia2x.com"},"keywords":["dark","theme","darktheme","darkmode","hook","react","reacthook"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alikia2x/useDarkTheme.git"},"bugs":{"url":"https://github.com/alikia2x/useDarkTheme/issues"},"homepage":"https://github.com/alikia2x/useDarkTheme#readme","dependencies":{"react":"^18.3.1"},"devDependencies":{"@types/react":"^18.3.3"},"_id":"@alikia/dark-theme-hook@1.0.2","gitHead":"73157faa8b96368e963067cc3180b4c8855e3644","_nodeVersion":"22.4.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-OloatZRefHB7Ey3zjhfsKFZoHbfzewPfOeEwA7q9zDXViNKGyTA4CiCF3US5vzqfhpR16wpYcPSmpVabKI3MYg==","shasum":"5222cef7997b1f4ea554e5156e59363e29cc57cb","tarball":"https://registry.npmjs.org/@alikia/dark-theme-hook/-/dark-theme-hook-1.0.2.tgz","fileCount":5,"unpackedSize":3763,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnws3dGa3DCRPk8aIS0r41iBgxDOqMnxuvZ4LHhygUIgIgB9Uiyx3prCK8vgF0UxOyHysGbdO/xeoWKA6FI2SrINs="}]},"_npmUser":{"name":"alikia2x","email":"ziwen243@outlook.com"},"directories":{},"maintainers":[{"name":"alikia2x","email":"ziwen243@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dark-theme-hook_1.0.2_1723479702505_0.9315818152751478"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-09T06:12:03.838Z","modified":"2024-08-12T16:21:42.877Z","1.0.0":"2024-08-09T06:12:04.071Z","1.0.1":"2024-08-09T06:15:09.415Z","1.0.2":"2024-08-12T16:21:42.675Z"},"bugs":{"url":"https://github.com/alikia2x/useDarkTheme/issues"},"author":{"name":"alikia2x","email":"alikia2x@outlook.com","url":"https://alikia2x.com"},"license":"MIT","homepage":"https://github.com/alikia2x/useDarkTheme#readme","keywords":["dark","theme","darktheme","darkmode","hook","react","reacthook"],"repository":{"type":"git","url":"git+https://github.com/alikia2x/useDarkTheme.git"},"description":"A React hook that responds to prefers-color-scheme","maintainers":[{"name":"alikia2x","email":"ziwen243@outlook.com"}],"readme":"# Dark Theme Hook\n\nDark Theme Hook is a custom React hook that allows you to detect the user's preferred color scheme, specifically whether they have enabled dark mode. This hook listens for changes in the user's system preferences and updates accordingly.\n\n## Installation\n\nYou can install Dark Theme Hook using your preferred package manager:\n\n```sh\nnpm install @alikia/dark-theme-hook\n```\n\n```sh\nyarn add @alikia/dark-theme-hook\n```\n\n```sh\npnpm add @alikia/dark-theme-hook\n```\n\n```sh\nbun add @alikia/dark-theme-hook\n```\n\n## Usage\n\nTo use the Dark Theme Hook in your React application, simply import and call the hook within your functional components:\n\n```jsx\nimport useDarkTheme from '@alikia/dark-theme-hook';\n\nfunction MyComponent() {\n    const isDarkMode = useDarkTheme();\n\n    return (\n        <div className={isDarkMode ? 'dark-mode' : 'light-mode'}>\n            <h1>Dark Mode Detection</h1>\n            <p>Dark mode is {isDarkMode ? 'enabled' : 'disabled'}.</p>\n        </div>\n    );\n}\n\nexport default MyComponent;\n```\n","readmeFilename":"README.md"}