0.1.0 • Published 2 years ago

vue3-verification-code-input v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue3-verification-code-input

🎉A verification code input for vue 3

NPM JavaScript Style Guide

NPM

Demo

Install

npm install --save vue3-verification-code-input

Usage

<template>
  <code-input
    @complete="completed = true"
    :fields="3"
    :fieldWidth="56"
    :fieldHeight="56"
    :required="true"
  />
  <button class="btn" :disabled="!completed">
		Continue
	</button>
</template>

<script setup>
import CodeInput from "./components/CodeInput.vue";
import { ref } from "vue";

const completed = ref(false);
</script>

PropTypes

KeyTypeDesc
fieldsnumberThe count of characters
disabledboolDisable the inputs
requiredboolrequire the inputs
fieldWidthnumberinput width
fieldHeightnumberinput height
titlestringcode input title
classNamestringclass name

EmitTypes

KeyTypeDesc
changefuncTrigger on character change
completefuncTrigger on all character inputs

License

MIT © zlayine