{"id":15024359,"url":"https://github.com/han109k/light-switch-bootstrap","last_synced_at":"2025-04-12T06:22:08.402Z","repository":{"id":39887521,"uuid":"378926152","full_name":"han109k/light-switch-bootstrap","owner":"han109k","description":"Dark mode toggle for Bootstrap 5","archived":false,"fork":false,"pushed_at":"2023-06-22T14:17:52.000Z","size":37,"stargazers_count":52,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T11:51:42.610Z","etag":null,"topics":["bootstrap","bootstrap5","dark-mode","dark-theme"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/han109k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-06-21T12:39:43.000Z","updated_at":"2025-01-24T10:16:06.000Z","dependencies_parsed_at":"2024-06-21T14:23:38.951Z","dependency_job_id":"4c509b45-6af0-4183-9876-5fe22364cdcf","html_url":"https://github.com/han109k/light-switch-bootstrap","commit_stats":null,"previous_names":["han109k/light-switch"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/han109k%2Flight-switch-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/han109k%2Flight-switch-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/han109k%2Flight-switch-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/han109k%2Flight-switch-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/han109k","download_url":"https://codeload.github.com/han109k/light-switch-bootstrap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525825,"owners_count":21118755,"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":["bootstrap","bootstrap5","dark-mode","dark-theme"],"created_at":"2024-09-24T20:00:10.721Z","updated_at":"2025-04-12T06:22:08.359Z","avatar_url":"https://github.com/han109k.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💡 Light Switch for Bootstrap 5\n\n\u003cp align=\"center\"\u003e\n\u003cb\u003eBasic Bootstrap 5 custom checkbox to use night mode in your web site.\u003c/b\u003e\n\u003c/p\u003e\n\n## Under the hood\n\nSwitching to dark mode is done by toggling HTML tags that includes `-dark` or `-light` as a class. Performed by DOM manipulation using JavaScript based on the default system theme. **Local storage** is used to save the choice under the name: _lightSwitch_\n\n## Installing\n\n- Download the latest release [v0.1.5](https://github.com/han109k/light-switch-bootstrap/archive/refs/tags/v0.1.5.zip)\n\n- Clone via `git clone https://github.com/han109k/light-switch-bootstrap.git`\n- Install with [npm](https://www.npmjs.com/package/light-switch-bootstrap) `npm i light-switch-bootstrap`\n\n## Usage\n\nAdd custom checkbox to your html file then reference the `switch.js` script:\n\n```html\n\u003cdiv class=\"form-check form-switch\"\u003e\n  \u003clabel class=\"form-check-label\" for=\"lightSwitch\"\u003e Dark Mode \u003c/label\u003e\n  \u003cinput class=\"form-check-input\" type=\"checkbox\" id=\"lightSwitch\" /\u003e\n\u003c/div\u003e\n\n\u003cscript src=\"/node_modules/light-switch-bootstrap/switch.js\"\u003e\u003c/script\u003e\n```\n\n### About Usage\n\nDesigned for the plain Bootstrap 5 theme. If you're using custom themes then, you will probably have to customize it for better results.\n\n## Example Implementation\n\n[Bootstrap 5 Demo](https://han109k.github.io/light-switch-bootstrap/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhan109k%2Flight-switch-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhan109k%2Flight-switch-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhan109k%2Flight-switch-bootstrap/lists"}