How to show/hide password in Vue.js?
Discussion at: https://devhubby.com/thread/how-to-show-hide-password-in-vue-js
#vuejs #javascript
DEVHUBBY.COM
How to show/hide password in Vue.js? I am working on the login page in Vue.js and I want to make a button "Show or Hide" password in UI based on user preferences in Vue.js, here is my code:<script setup>
import {ref} from 'vue'
const password = ref("");
</script>
<template>
<h1>How to show/hide password in Vue.js?</h1>
<label for="password">Password:</label>
<input v-model="password" type="password" id="password" />
<button>Show / Hide Password</button>
</template>
How can I make it works?
0 Shares
265 Views