All Projects → miladd3 → vue-simple-password-meter

miladd3 / vue-simple-password-meter

Licence: other
Vue Simple Password Meter is a simple password strength meter component written in vanilla js and extremly lightweight

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to vue-simple-password-meter

app
专门为互联网人打造的题解神器,神器在手,工作不愁
Stars: ✭ 64 (-1.54%)
Mutual labels:  vue3, vue3-typescript
keepassxc-pwned
Check your keepassxc database against previously breached haveibeenpwned passwords
Stars: ✭ 25 (-61.54%)
Mutual labels:  password, password-strength
taro3-vue3-template
一个基于 Taro3 和 Vue3 框架微信小程序模版。 核心技术采用Taro3、Vue3、TypeScript、NutUi、Vux4/Pinia、VueUse
Stars: ✭ 115 (+76.92%)
Mutual labels:  vue3, vue3-typescript
vue-next-admin
🎉🎉🔥基于vue3.x 、Typescript、vite、Element plus等,适配手机、平板、pc 的后台开源免费模板库(vue2.x请切换vue-prev-admin分支)
Stars: ✭ 1,002 (+1441.54%)
Mutual labels:  vue3, vue3-typescript
react-native-passmeter
Simple password strength meter for React Native.
Stars: ✭ 46 (-29.23%)
Mutual labels:  password, password-strength
chengpeiquan.com
My personal website. Base on Vite 2.0 and Vue 3.0. If you want to know how to use Vite to develop a project, you can refer to this repository.
Stars: ✭ 43 (-33.85%)
Mutual labels:  vue3, vue3-typescript
vue3-vite-ts
Vue 3 Scaffolding (Vite + TS + Linters + Jest + TailwindCSS)
Stars: ✭ 27 (-58.46%)
Mutual labels:  vue3, vue3-typescript
Cupp
The most common form of authentication is the combination of a username and a password or passphrase. If both match values stored within a locally stored table, the user is authenticated for a connection. Password strength is a measure of the difficulty involved in guessing or breaking the password through cryptographic techniques or library-based automated testing of alternate values.
Stars: ✭ 2,493 (+3735.38%)
Mutual labels:  password, password-strength
password-list
Password lists with top passwords to optimize bruteforce attacks
Stars: ✭ 174 (+167.69%)
Mutual labels:  password, password-strength
vuniversal
[WIP] Create vue (3) universal web applications quickly by @vitejs.
Stars: ✭ 20 (-69.23%)
Mutual labels:  vue3, vue3-typescript
2019-ncov-vue3-version
新型冠状病毒实时疫情 Vue-Compostion-Api版本 (Vue3 + TypeScript)
Stars: ✭ 55 (-15.38%)
Mutual labels:  vue3, vue3-typescript
jquery.pwstrength
A jQuery plugin to indicate the strength of passwords
Stars: ✭ 22 (-66.15%)
Mutual labels:  password, password-strength
Python Scripts
Collection of Various Python Script's.💻
Stars: ✭ 195 (+200%)
Mutual labels:  password, password-strength
miter-design
Miter Design component library made with ♡ by Prefect
Stars: ✭ 14 (-78.46%)
Mutual labels:  vue3, vue3-typescript
Password Strength
Angular UI library to illustrate and validate a password's strength with material design - Angular V9 supported
Stars: ✭ 186 (+186.15%)
Mutual labels:  password, password-strength
vue3-md-blog
✍️ Minimal config Vue3 + Markdown blog engine
Stars: ✭ 53 (-18.46%)
Mutual labels:  vue3, vue3-typescript
Passwordstrengthbundle
Symfony Password strength and blacklisting validator bundle
Stars: ✭ 123 (+89.23%)
Mutual labels:  password, password-strength
React Password Strength
A password strength indicator field for use in React projects
Stars: ✭ 167 (+156.92%)
Mutual labels:  password, password-strength
vue3-docs
vue中文社区,vue3 中文文档
Stars: ✭ 180 (+176.92%)
Mutual labels:  vue3, vue3-typescript
adminlte-3-vue
Vue 3.2.31 start-up project with AdminLTE 3.2.0 template
Stars: ✭ 134 (+106.15%)
Mutual labels:  vue3, vue3-typescript

vue-simple-password-meter

Are you using Vue 3? Check out Vue Simple Password Meter v1

Vue Simple Passwod Meter is a simple password checker written in vanilla js and extremly lightweight (3.2kb minified + Gzipped)

Demo

Demo

Install

npm install vue-simple-password-meter --save

Usage

Simply use v-model and send it to the component using password prop

<template>
  <form>
    <label for="password">Password</label>
    <input id="password" type="password" v-model="passwordValue" />
    <password-meter :password="passwordValue" />
  </form>
</template>

<script>
import passwordMeter from "vue-simple-password-meter";

export default {
  components: { passwordMeter },
  data: () => ({
    passwordValue: null
  })
};
</script>

Customize using css

If you wanna customize the bar its really simple with some easy css you can customize it

Overwrite these css styles globally and change each state color and style

.po-password-strength-bar {
    border-radius: 2px;
    transition: all 0.2s linear;
    height: 5px;
    margin-top: 8px;
}

.po-password-strength-bar.risky {
    background-color: #f95e68;
    width: 10%;
}

.po-password-strength-bar.guessable {
    background-color: #fb964d;
    width: 32.5%;
}

.po-password-strength-bar.weak {
    background-color: #fdd244;
    width: 55%;
}

.po-password-strength-bar.safe {
    background-color: #b0dc53;
    width: 77.5%;
}

.po-password-strength-bar.secure {
    background-color: #35cc62;
    width: 100%;
}

Events

You can use event score to use scored number between 0 to 4 that scores password from risky to secure with 4 is a secure password and 0 is risky and between.

You can use this as a form verification tool

See below example for more detail

<template>
  <form>
    <label for="password">Password</label>
    <input id="password" type="password" v-model="passwordValue" />
    <span v-if="score === 0">Use better password</span>

    <password-meter :password="passwordValue" @score="onScore" />
  </form>
</template>

<script>
import passwordMeter from "vue-simple-password-meter";

export default {
  components: { passwordMeter },
  data: () => ({
    passwordValue: null,
    score: null
  }),
  methods: {
    onScore({ score, strength }) {
      console.log(score); // from 0 to 4
      console.log(strength); // one of : 'risky', 'guessable', 'weak', 'safe' , 'secure' 
      this.score = score;
    }
  }
};
</script>

Contributing

If you want to contribute to this project simply fork it and clone it then run npm i in the root of the project, then run npm run serve to run development server.

Motivation

Since Every other components and libraries mostly were using zxcvbn was 799.5kb minified and 388.3kb minified and Gzipped so i decided to make simpler approach and use regex instead of dictionary for validating.

Licence and cast

MIT Licence

by Milad Dehghan

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].