Skip to content

Instantly share code, notes, and snippets.

View alexandermoura's full-sized avatar

Alexander Moura alexandermoura

View GitHub Profile
@alexandermoura
alexandermoura / PasswordField.vue
Created December 14, 2021 20:03 — forked from imadphp/PasswordField.vue
Show/Hide password in VueJS (Bootstrap, FontAwesome)
<template>
<div class="form-inline">
<div v-if="!passwordHidden">
<label>
<span class="strong-label">{{ fieldLabel }}</span>
<input type="text" class="password-field form-control d-inline" v-model="passwordText" />
<span class="display-eye fa fa-eye-slash" @click="hidePassword"></span>
</label>
</div>
<div v-if="passwordHidden">
@alexandermoura
alexandermoura / script.vue
Created December 8, 2021 01:04
Show / Hide Password in Vue
<!-- Use preprocessors via the lang attribute! e.g. <template lang="pug"> -->
<template>
<div id="app">
<section class="section container">
<h1 class="title">Show / Hide Password In Vue</h1>
<p class="content">
This Pen demonstrates a feature that lets the user view the unmasked
contents of a password field. A
<code>showPassword</code>
flag controls whether or not the user is working with a type="text" or