Skip to content

InputOTP

The brutal, clunky-in-a-good-way fields for one time passwords or verification codes.

Basic Usage

The component renders multiple square input boxes that auto-focus linearly when a user types or deletes characters. It also handles pasting seamlessly.

loading

API

Props

PropertyTypeDefaultDescription
v-modelstring""The bound token value.
lengthnumber6Number of input fields to render.
disabledbooleanfalseWhether the input is disabled.

Events

EventParametersDescription
complete(value: string)Fired when all fields are filled.
update:modelValue(value: string)Fired on every input change.

MIT License