
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
vue-password-checker
Advanced tools
A configurable password strength checker for Vue js
Vue password checker can be installed with both npm and yarn as usual.
npm install vue-password-checker
yarn add vue-password-checker
And then can be imported into your project.
import 'PasswordChecker' from "vue-password-checker";
Vue Password checker takes the following props for configuration:
Type: String The variable to be checked.
required
Type: Boolean
Used to define the font the text will use.
default: false
Type: Object Used to define the colors the strength bar and text will use.
default:
{
invalid: '#000',
very_weak: '#FFF',
weak: '#d44137',
good: '#e36e0e',
strong: '#c4c934',
very_strong: '#24ed09',
}
Type: Boolean When true, a list will be shown instructing what counts as strong password.
default: false
Type: Number
The minimum length the password checker should look for.
default: 6
In order to get the strength value for the password the component is tracking, you can use the getStrength() function, a value from 0 to 100 is returned.
<template>
<div>
<password-checker ref="checker" :password="password" show-instructions>
<label for="password">Password</label>
<input id="password" type="password" v-model="password">
</password-checker>
</div>
</template>
<script>
import PasswordChecker from "vue-password-checker";
export default {
name: "App",
data(){
return{
password: '',
}
},
components: {
PasswordChecker,
},
mounted:{
//Writes the password strength value to console
console.log(this.$refs.checker.getStrength());
}
}
</script>
The password checker has a slot for inputs to sit in so can be used in this way:
<template>
<div>
<password-checker :password="password" show-instructions>
<label for="password">Password</label>
<input id="password" type="password" v-model="password">
</password-checker>
</div>
</template>
<script>
import PasswordChecker from "vue-password-checker";
export default {
name: "App",
data(){
return{
password: '',
}
},
components: {
PasswordChecker,
}
}
</script>
Or separately
<template>
<div>
<password-checker :password="password" show-instructions></password-checker>
<label for="password">Password</label>
<input id="password" type="password" v-model="password">
</div>
</template>
<script>
import PasswordChecker from "./src/PasswordChecker";
export default {
name: "App",
data(){
return{
password: '',
}
},
components: {
PasswordChecker,
}
}
</script>
FAQs
A password strength checker for Vue js
The npm package vue-password-checker receives a total of 26 weekly downloads. As such, vue-password-checker popularity was classified as not popular.
We found that vue-password-checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.