{"id":16412480,"url":"https://github.com/coliff/bootstrap-show-password-toggle","last_synced_at":"2025-04-06T16:12:58.472Z","repository":{"id":37833979,"uuid":"276922822","full_name":"coliff/bootstrap-show-password-toggle","owner":"coliff","description":"A show password as text toggle for Bootstrap forms","archived":false,"fork":false,"pushed_at":"2025-03-01T18:09:22.000Z","size":524,"stargazers_count":43,"open_issues_count":10,"forks_count":17,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T11:09:04.555Z","etag":null,"topics":["bootstrap","bootstrap-forms","forms","hacktoberfest","password-toggle"],"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/coliff.png","metadata":{"funding":{"github":"coliff","ko_fi":"coliff","custom":"https://paypal.me/coliff","thanks_dev":"u/gh/coliff"},"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-03T14:46:07.000Z","updated_at":"2025-02-25T17:09:33.000Z","dependencies_parsed_at":"2023-02-06T11:16:42.033Z","dependency_job_id":"f3ca62d6-66bb-4b70-8a5f-67a1686319f1","html_url":"https://github.com/coliff/bootstrap-show-password-toggle","commit_stats":{"total_commits":110,"total_committers":5,"mean_commits":22.0,"dds":0.3727272727272727,"last_synced_commit":"24fa38914a771fbcf80f046ff9c13eca5f5213f5"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coliff%2Fbootstrap-show-password-toggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coliff%2Fbootstrap-show-password-toggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coliff%2Fbootstrap-show-password-toggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coliff%2Fbootstrap-show-password-toggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coliff","download_url":"https://codeload.github.com/coliff/bootstrap-show-password-toggle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509235,"owners_count":20950232,"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","bootstrap-forms","forms","hacktoberfest","password-toggle"],"created_at":"2024-10-11T06:49:05.837Z","updated_at":"2025-04-06T16:12:58.447Z","avatar_url":"https://github.com/coliff.png","language":"HTML","readme":"[![LICENSE](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/coliff/bootstrap-show-password-toggle/master/LICENSE)\n[![GitHub Super-Linter](https://github.com/coliff/bootstrap-show-password-toggle/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)\n[![GitHub Stars](https://img.shields.io/github/stars/coliff/bootstrap-show-password-toggle.svg?label=github%20stars)](https://github.com/coliff/bootstrap-show-password-toggle)\n[![npm Version](https://img.shields.io/npm/v/bootstrap-show-password-toggle)](https://www.npmjs.com/package/bootstrap-show-password-toggle)\n[![npm Downloads](https://img.shields.io/npm/dt/bootstrap-show-password-toggle.svg)](https://www.npmjs.com/package/bootstrap-show-password-toggle)\n\n# Bootstrap Show Password Toggle\n\nA show password as text toggle for Bootstrap forms\n\n- Native-looking UI\n- Vanilla JavaScript with no dependencies\n- Base64 encoded SVG icons (no external images or fonts required)\n- Graceful fallback for browsers with JavaScript disabled\n- Works with Bootstrap 4 and 5\n- Supports dark mode (Bootstrap 5 only)\n- Only 1KB gzipped\n\n![show password toggle](https://christianoliff.com/img/2020/show-password-toggle-anim.gif)\n\n## Quick Start\n\n- [Download the latest release](https://github.com/coliff/bootstrap-show-password-toggle/)\n- Clone the repo `git clone https://github.com/coliff/bootstrap-show-password-toggle.git`\n- Install with [npm](https://www.npmjs.com/package/bootstrap-show-password-toggle) `npm install bootstrap-show-password-toggle`\n- Install with [yarn](https://yarnpkg.com/package/bootstrap-show-password-toggle) `yarn add bootstrap-show-password-toggle`\n\n## Usage\n\n1. Include the `show-password-toggle.min.css` in your CSS\n\n2. Wrap the password input in an `input-group` div as follows:\n\n```html\n\u003cdiv class=\"input-group\"\u003e\n  \u003cinput type=\"password\" class=\"form-control rounded\" required\u003e\n  \u003cbutton id=\"toggle-password\" type=\"button\" class=\"d-none\"\n    aria-label=\"Show password as plain text. Warning: this will display your password on the screen.\"\u003e\n  \u003c/button\u003e\n\u003c/div\u003e\n```\n\n3. Load the `show-password-toggle.min.js` after the form\n\nI highly recommend adding the attributes: `spellcheck=\"false\"`, `autocorrect=\"off\"` and `autocapitalize=\"off\"` to the password input so that when the password is displayed in plain text the input is not auto-corrected, capitalized or spellchecked (to avoid red squiggly line underneath).\n\nYou should also add `name=\"current-password\"` and `autocomplete=\"current-password\"` to help browsers autocomplete the form.\n\n## Demo\n\n- [Bootstrap 5 Demo](https://coliff.github.io/bootstrap-show-password-toggle/tests/bootstrap5-sign-in/)\n- [Bootstrap 4 Demo](https://coliff.github.io/bootstrap-show-password-toggle/tests/bootstrap4-sign-in/)\n\n## Browser Support\n\nWorks well with all the browsers [supported by Bootstrap](https://getbootstrap.com/docs/5.3/getting-started/browsers-devices/#supported-browsers)\n\n## FAQS\n\nQ. **Can I change the show password icon?**\n\nA. Yes you can change the icon displayed by replacing the `.input-password[type=\"password\"]` [Base64 encoded](https://yoksel.github.io/url-encoder/) background image. SVG is recommended.\n\n## Known Issues\n\n- If the browser autofills the password input then the user-agent will apply `background-image: none !important`.\n- The password input requires the use of the `required` attribute. This is so the background-image is not displayed when the input is empty. (It'd be great if browsers supported the [:blank](https://developer.mozilla.org/en-US/docs/Web/CSS/:blank) pseudo-selector!)\n\n## Credits and Thanks\n\n- MDO and Bootstrap team for the [icons](https://icons.getbootstrap.com/icons/eye-slash/)\n- Sam Dutton at Google for the idea and initial JavaScript from the '[Sign-in form Best Practices](https://web.dev/sign-in-form-best-practices/)' article\n- [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers\n","funding_links":["https://github.com/sponsors/coliff","https://ko-fi.com/coliff","https://paypal.me/coliff","https://thanks.dev/u/gh/coliff"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoliff%2Fbootstrap-show-password-toggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoliff%2Fbootstrap-show-password-toggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoliff%2Fbootstrap-show-password-toggle/lists"}