Form password

Create a form with a toggle to hide or show passwords.


To apply this component, add the uk-form-password class to a <div> element around a password input field. To create a toggle for showing or hiding passwords, just add the .uk-form-password-toggle class and the data-uk-form-password attribute to an <a> element.



<form class="uk-form">
    <div class="uk-form-password">
        <input type="password">
        <a href="" class="uk-form-password-toggle" data-uk-form-password>...</a>

JavaScript options

This is an example of how to set options via attribute:

data-uk-form-password="{lblShow:'...', lblHide:'...'}"
Option Possible value Default Description
lblShow any string 'Show' Hide label text
lblHide any string 'Hide' Show label text