All Projects → coliff → bootstrap-show-password-toggle

coliff / bootstrap-show-password-toggle

Licence: MIT License
A show password as text toggle for Bootstrap forms

Programming Languages

HTML
75241 projects
SCSS
7915 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to bootstrap-show-password-toggle

form-js
View and visually edit JSON-based forms.
Stars: ✭ 125 (+495.24%)
Mutual labels:  forms
docker-formio-api
Docker Form.io Server based on Debian w/s6 init, Zabbix Monitoring
Stars: ✭ 14 (-33.33%)
Mutual labels:  forms
laravel-crud-forms
Create CRUD Forms for Laravel Models.
Stars: ✭ 38 (+80.95%)
Mutual labels:  forms
bootstrap-add-clear
bootstrap plugin to add a (x) clear button to your input fields
Stars: ✭ 36 (+71.43%)
Mutual labels:  forms
react-emotion-multi-step-form
React multi-step form library with Emotion styling
Stars: ✭ 25 (+19.05%)
Mutual labels:  forms
ContactEtc
Laraval package to instantly add a customisable contact form to your site.
Stars: ✭ 21 (+0%)
Mutual labels:  forms
Toast
To use it in PCL or .NetStandard projects write this line of code : CrossToastPopUp.Current.ShowToastMessage("Message");
Stars: ✭ 51 (+142.86%)
Mutual labels:  forms
Autofillr
A browser extension that fills registration forms with randomly but consistently generated fake data.
Stars: ✭ 17 (-19.05%)
Mutual labels:  forms
jquery-ajaxSubmit
Effortlessly submit forms using AJAX and JSON.
Stars: ✭ 39 (+85.71%)
Mutual labels:  forms
node-wufoo
A Node.JS library for the Wufoo API.
Stars: ✭ 13 (-38.1%)
Mutual labels:  forms
react-form-validation-demo
React Form Validation Demo
Stars: ✭ 88 (+319.05%)
Mutual labels:  forms
valid8
Valid8 - Super Simple Bootstrap Form Valiation
Stars: ✭ 17 (-19.05%)
Mutual labels:  forms
tubular-dotnet
Tubular .NET Library
Stars: ✭ 16 (-23.81%)
Mutual labels:  forms
CustomFormViews
A clean collection of views used for forms.
Stars: ✭ 12 (-42.86%)
Mutual labels:  forms
AltoControls
Custom controls for .Net WinForm
Stars: ✭ 76 (+261.9%)
Mutual labels:  forms
formio
Formio, form definition and binding library for Java platform
Stars: ✭ 24 (+14.29%)
Mutual labels:  forms
mobx-form
Declarative, complex forms with Mobx/React with lots of dynamic/imperative hooks
Stars: ✭ 29 (+38.1%)
Mutual labels:  forms
freetron
Open-source scantron software implementation
Stars: ✭ 14 (-33.33%)
Mutual labels:  forms
yii2-forms
Forms CRUD - formbuilder, generator code
Stars: ✭ 32 (+52.38%)
Mutual labels:  forms
Table-Detection-Extraction
Detect the tables in a form and extract the tables as well as the cells of the tables.
Stars: ✭ 35 (+66.67%)
Mutual labels:  forms

LICENSE GitHub Super-Linter GitHub Stars NPM Version NPM Downloads Language grade: JavaScript

Bootstrap Show Password Toggle

A show password as text toggle for Bootstrap forms

  • Native-looking UI
  • Vanilla JavaScript with no dependencies
  • Base64 encoded SVG icons (no external images or fonts required)
  • Graceful fallback for browsers with JavaScript disabled
  • Works with Bootstrap 4 and 5
  • Only 1KB gzipped

show password toggle

Quick Start

  • Download the latest release
  • Clone the repo git clone https://github.com/coliff/bootstrap-show-password-toggle.git
  • Install with npm npm install bootstrap-show-password-toggle
  • Install with yarn yarn add bootstrap-show-password-toggle

Usage

  1. Include the show-password-toggle.css in your CSS

  2. Wrap the password input in an input-group div as follows:

<div class="input-group">
  <input type="password" class="form-control rounded" required>
  <button id="toggle-password" type="button" class="d-none"
    aria-label="Show password as plain text. Warning: this will display your password on the screen.">
  </button>
</div>
  1. Load the show-password-toggle.js after the form

I 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).

You should also add name="current-password" and autocomplete="current-password" to help browsers autocomplete the form.

Demo

Browser Support

Works well with all the browsers supported by Bootstrap

FAQS

Q. Can I change the show password icon?

A. You could change the icon displayed by replacing the .input-password[type="password"] Base64 encoded background image. SVG is recommended.

Known Issues

  • If the browser autofills the password input then the user-agent will apply background-image: none !important.
  • 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 or :empty pseudo-selectors!)

Credits and Thanks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].