{"id":28486819,"url":"https://github.com/mohammadzaid07/theme-switcher","last_synced_at":"2026-05-18T09:36:37.566Z","repository":{"id":296564766,"uuid":"993767541","full_name":"mohammadzaid07/theme-switcher","owner":"mohammadzaid07","description":"A simple app to demonstrate Dark/Light mode toggle","archived":false,"fork":false,"pushed_at":"2025-05-31T15:23:23.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-01T03:41:53.683Z","etag":null,"topics":["react","react-context-api","tailwind-dark-mode"],"latest_commit_sha":null,"homepage":"https://mohammadzaid07.github.io/theme-switcher/","language":"JavaScript","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/mohammadzaid07.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,"zenodo":null}},"created_at":"2025-05-31T13:33:41.000Z","updated_at":"2025-05-31T15:42:52.000Z","dependencies_parsed_at":"2025-06-01T04:01:34.613Z","dependency_job_id":null,"html_url":"https://github.com/mohammadzaid07/theme-switcher","commit_stats":null,"previous_names":["mohammadzaid07/theme-switcher"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohammadzaid07/theme-switcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadzaid07%2Ftheme-switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadzaid07%2Ftheme-switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadzaid07%2Ftheme-switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadzaid07%2Ftheme-switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammadzaid07","download_url":"https://codeload.github.com/mohammadzaid07/theme-switcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadzaid07%2Ftheme-switcher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269408831,"owners_count":24412132,"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-08-08T02:00:09.200Z","response_time":72,"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":["react","react-context-api","tailwind-dark-mode"],"created_at":"2025-06-08T02:43:44.080Z","updated_at":"2026-05-18T09:36:32.525Z","avatar_url":"https://github.com/mohammadzaid07.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎨 Theme Switcher App (Dark/Light Mode)\n\nA simple React application that demonstrates how to implement **theme switching (light/dark)** using **React Context API** and **Tailwind CSS**.\n\n## 🌐 Live Demo\n\n🔗 [Click here to try it out](https://mohammadzaid07.github.io/theme-switcher/)\n\n## 🚀 Features\n\n- ⚛️ Built with React + Vite\n- 🌗 Light/Dark mode switch\n- 🎨 Uses Tailwind CSS’s dark mode classes\n- 🧠 Global theme state managed via React Context API\n\n## 🛠️ Tech Stack\n\n- React\n- Tailwind CSS\n- React Context API\n- Vite\n\n## 💡 How It Works\n\n1. The current theme (`light` or `dark`) is stored in a React state.\n2. Theme context provides `lightTheme` and `darkTheme` functions globally.\n3. A `useEffect` hook updates the `html` tag's class based on the selected theme.\n4. Tailwind's dark mode styles respond accordingly.\n\n## 🎛️ Components\n\n- **ThemeBtn**: A toggle button that switches between light and dark mode.\n- **Card**: A sample card to demonstrate how styles adapt to the selected theme.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadzaid07%2Ftheme-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadzaid07%2Ftheme-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadzaid07%2Ftheme-switcher/lists"}