Skip to content

VerifyCode

Input for verification / OTP codes.

Basic Usage

vue
<template>
  <bp-verify-code v-model="code"></bp-verify-code>
</template>

<script setup lang="ts">
import { ref } from "vue";
const code = ref<string>("");
</script>

Password Input

Mask digits with type set to password.

vue
<template>
  <bp-verify-code type="password" v-model="code"></bp-verify-code>
</template>

<script setup lang="ts">
import { ref } from "vue";
const code = ref<string>("123456");
</script>

Status

Disable or lock input with disabled and readonly.

vue
<template>
  <bp-space type="vertical">
    <bp-verify-code disabled v-model="code"></bp-verify-code>
    <bp-verify-code readonly v-model="code"></bp-verify-code>
  </bp-space>
</template>

<script setup lang="ts">
import { ref } from "vue";
const code = ref<string>("123456");
</script>

VerifyCode Props

v-modelBound value
String
--
typeInput type
InputType
text-
sizeInput size
InputSize
default-
lengthVerification code length
Number
6-
disabledWhether disabled
Boolean
false-
readonlyWhether readonly
Boolean
false-

VerifyCode Events

finishTriggered when input is complete--

VerifyCode Methods

focusFocus---