Skip to content

PrimeInputOtp

A FormKit wrapper for PrimeVue's InputOtp component.

Live Example on Website

Usage

vue
<FormKit type="primeinputotp" v-model="otp" length="6" />

Object-based Example

vue
<script setup>
const schema = [
  { $formkit: 'primeInputOtp', name: 'firstInput', label: 'Input OTP', length: 6, integerOnly: true, mask: true, variant: 'outlined' },
  { $formkit: 'primeInputOtp', name: 'secondInput', label: 'Input OTP', length: 3 },
]
const data = {}
</script>

<template>
  <FormKit :schema="schema" :data="data" />
</template>

Props

NameTypeDescription
lengthnumberNumber of OTP digits
integerOnlybooleanOnly allow integer input
maskbooleanMask input
variantstringVisual variant
ptobjectPass-through options
ptOptionsobjectPass-through options
unstyledbooleanDisable default styles
sizestringInput size

See PrimeVue InputOtp docs for more details.

FormKit PrimeVue Module