1.0.0 • Published 5 years ago

vue-verification-code-input v1.0.0

Weekly downloads
931
License
MIT
Repository
github
Last release
5 years ago

vue-verification-code-input

🎉A verification code input

NPM JavaScript Style Guide

NPM

Live demo

Install

npm install --save vue-verification-code-input

Usage

<template>
  <div id="app">
    <CodeInput :loading="false" class="input" v-on:change="onChange" v-on:complete="onComplete" />
  </div>
</template>

<script>
import CodeInput from "vue-verification-code-input";

export default {
  name: "app",
  components: {
    CodeInput
  },
  methods: {
    onChange(v) {
      console.log("onChange ", v);
    },
    onComplete(v) {
      console.log("onComplete ", v);
    }
  }
};
</script>

PropTypes

KeyTypeDesc
typetextone of number or text
fieldsnumberThe count of characters
onChangefuncTrigger on character change
onCompletefuncTrigger on all character inputs
fieldWidthnumberinput width
fieldHeightnumberinput height
autoFocusboolauto focus first input on init
titlestringcode input title
loadingboolshow loading flag
classNamestringclass name
valuesarraydefault values

License

MIT © suweya