1.1.2 • Published 6 years ago

nb-vue-password-strength-meter v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

🔓 vue-password-strength-meter

Build Status npm version vue2 license

Interactive password strength meter based on zxcvbn for vue.js

📺 Demo

Demo here

🔧 Install

yarn add vue-password-strength-meter zxcvbn

👈 Usage

<script>
  import Password from 'vue-password-strength-meter'
  export default {
    components: { Password },
    data () {
      return {
        password: null
      }
    }
  }
</script>

<template>
  <password v-model="password"></password>
</template>

Props

PropTypeDefault ValueDescription
idStringpasswordinput field id attribute
placeholderStringPlease enter your passwordinput field placeholder attribute
nameStringpasswordinput field name attribute
requiredBooleantrueinput field required attribute
secureLengthNumber7password min length
badgeBooleantruedisplay password count badge
defaultClassStringPassword__fieldinput field class
errorClassStringPassword__badge--errorerror class for password count badge
successClassStringPassword__badge--successsuccess class for password count badge
strengthMeterClassStringPassword__strength-meterstrength-meter class
strengthMeterFillClassStringPassword__strength-meter--fillstrength-meter class for individual data fills
tabindexStringnullTabindex for nested input

💅 Customizing

You can customize the styling of the input field, badge and strength-meter by passing your own css classes to defaultClass, strengthMeterClass etc.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# run unit tests
npm run unit

# run all tests
npm test

For detailed explanation on how things work, checkout the guide and docs for vue-loader.