{"adoption": {"forks": 95, "observed_at": "2026-08-28T04:04:13.957128+00:00", "stars": 1282}, "canonical_url": "https://ross.abutalabs.com/products/use-dark-mode", "card": {"archived": false, "artifact_type": "library", "description": "A custom React Hook to help you implement a \"dark mode\" component.", "domain": ["frontend", "web-development"], "enriched": true, "function": ["state-management", "ui-components", "theme"], "health_score": 20, "homepage": null, "language": "JavaScript", "license": "MIT", "license_family": "permissive", "maturity": "maintenance", "member_repos": ["donavon/use-dark-mode"], "name": "donavon/use-dark-mode", "platform": ["browser"], "pushed_at": "2023-01-03T15:59:16+00:00", "repo": "donavon/use-dark-mode", "stars": 1282, "tags": ["react-hooks", "dark-mode", "dark-theme", "localstorage", "prefers-color-scheme", "ssr", "nodejs"], "topics": ["react", "hooks", "dark-theme", "dark-mode"], "urls": [], "use_cases": ["add a dark mode toggle to a react app", "persist user theme preference in localstorage", "sync dark mode state across browser tabs", "follow system dark mode preference with prefers-color-scheme", "toggle a css class on body for theming", "implement dark mode in a server-side rendered react app"], "what_it_is": "A custom React Hook that implements dark mode toggling for React applications. It persists the user's preference to localStorage, syncs state across tabs, respects the system's prefers-color-scheme setting, and supports SSR.", "when_to_avoid": ["you don't use React", "you need full theming/design-token management rather than a simple light/dark toggle", "you need a framework-agnostic or vanilla JS solution"], "when_to_choose": ["you use React 16.8+ and want a small, focused hook for dark mode", "you want persistence, cross-tab sync, and system preference detection out of the box", "you need SSR support for theme switching"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/use-dark-mode", "repo": "donavon/use-dark-mode", "role": "main", "score": 32}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:04:13.957128+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T04:57:41.977159+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "89033164fdbac611905a2552da6c21c1b6a2e015bcbfa25a7fc9c7b393cff67b", "fetched_at": "2026-08-28T04:04:13.957128+00:00", "kind": "readme", "missing": false, "url": "https://github.com/donavon/use-dark-mode"}, {"content_hash": "7fa72980749d9b0d7537e741c8bd9fc8b3fe74f5bdca73f6dc647d1b40165563", "fetched_at": "2026-08-29T12:12:56.344704+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-dark-mode"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 0, "longevity": 100, "rhythm": 35}, "computed_at": "2026-09-02T17:46:02.011165+00:00", "flags": ["no_releases"], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 2788, "days_push": 1338, "days_rel": null, "gap_med": null, "n_releases_24m": 0}, "score": 32, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}